Skip to content

Commit

Permalink
Default isEnabled to true.
Browse files Browse the repository at this point in the history
At first, there is no value saved.  So it's undefined which is falsy.  Instead, start enabled.

Fixes #2562
  • Loading branch information
arantius committed Jan 9, 2018
1 parent da6da75 commit b994449
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bg/is-enabled.js
Expand Up @@ -9,6 +9,7 @@ of Greasemonkey.
let isEnabled = true;
chrome.storage.local.get('globalEnabled', v => {
isEnabled = v['globalEnabled'];
if ('undefined' == typeof isEnabled) isEnabled = true;
setIcon();
});

Expand Down

0 comments on commit b994449

Please sign in to comment.