Skip to content

Commit 3f97ec6

Browse files
author
Zeus Gómez Marmolejo
committed
better checking for undefined value
1 parent de8695b commit 3f97ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.useColors = useColors;
1818

1919
var storage;
2020

21-
if (chrome && chrome.storage)
21+
if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined')
2222
storage = chrome.storage.local;
2323
else
2424
storage = window.localStorage;

0 commit comments

Comments
 (0)