better checking for undefined value

This commit is contained in:
Zeus Gómez Marmolejo 2014-10-17 12:08:54 +02:00
parent de8695b6be
commit 3f97ec6f00

View File

@ -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;