File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const twitchUrlRegexp = /^https:\/\/www.twitch.tv\/*/;
2323let isEnabled = true ;
2424
2525browser . storage . local . get ( ) . then ( ( currentState ) => {
26- isEnabled = ! ! currentState . isEnabled ;
26+ isEnabled = typeof currentState . isEnabled === 'boolean' ? currentState . isEnabled : true ;
2727 if ( ! isEnabled ) {
2828 browser . browserAction . setIcon ( { path : iconsDisabled } ) ;
2929 }
@@ -50,12 +50,10 @@ function emitStatus(tabId, isEnabled) {
5050
5151function lockForTab ( tabId ) {
5252 browser . browserAction . disable ( tabId ) ;
53- browser . browserAction . setIcon ( { path : iconsDisabled , tabId } ) ;
5453}
5554
5655function unlockForTab ( tabId ) {
5756 browser . browserAction . enable ( tabId ) ;
58- browser . browserAction . setIcon ( { path : iconsEnabled , tabId } ) ;
5957}
6058
6159browser . storage . onChanged . addListener ( ( changes , areaName ) => {
You can’t perform that action at this time.
0 commit comments