fix(extension): polyfill chrome.storage.sync for Electron (#711)

`chrome.storage.sync` is not supported on Electron (https://www.electronjs.org/docs/api/extensions#chromestorage).

Co-authored-by: Nathan Bierema <nbierema@gmail.com>
This commit is contained in:
zhuhaow 2021-05-17 23:03:56 +08:00 committed by GitHub
parent 9eb1644776
commit f4b9c4b057
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,6 @@ if (window.isElectron) {
}; };
} }
if (isFirefox) { if (isFirefox || window.isElectron) {
chrome.storage.sync = chrome.storage.local; chrome.storage.sync = chrome.storage.local;
} }