Skip to content

Commit

Permalink
Change container, graph existance checking condition
Browse files Browse the repository at this point in the history
  • Loading branch information
puroong committed Nov 1, 2017
1 parent 377370f commit 7b3abbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ function applyOptions() {
// Observe DOM modifications
var container = document.getElementById('js-pjax-container');

if (container !== undefined) {
if (container) {
var observer = new MutationObserver(function(mutations) {
var graph = document.getElementsByClassName('js-contribution-graph')[0];

if (graph !== undefined) {
if (graph) {
applyOptions();
}
});
Expand Down

0 comments on commit 7b3abbf

Please sign in to comment.