mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
better checking for undefined value
This commit is contained in:
parent
de8695b6be
commit
3f97ec6f00
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user