Skip to content

Commit 6421101

Browse files
author
Guillaume Chau
committed
fix: chrome API check
1 parent 173a508 commit 6421101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// If we can, we use the browser extension API to store data
22
// it's async though, so we synchronize changes from an intermediate
33
// storageData object
4-
const useStorage = typeof chrome.storage !== 'undefined'
4+
const useStorage = typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined'
55

66
let storageData = null
77

0 commit comments

Comments
 (0)