Skip to content

Commit

Permalink
better checking for undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeus Gómez Marmolejo committed Oct 17, 2014
1 parent de8695b commit 3f97ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.useColors = useColors;

var storage;

if (chrome && chrome.storage)
if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined')
storage = chrome.storage.local;
else
storage = window.localStorage;
Expand Down

0 comments on commit 3f97ec6

Please sign in to comment.