Polyfill chrome.storage.sync for Electron

`chrome.storage.sync` is not supported on Electron (https://www.electronjs.org/docs/api/extensions#chromestorage).
This commit is contained in:
zhuhaow 2021-04-30 22:31:03 +08:00 committed by GitHub
parent a094e3b42c
commit 894fbfc387
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;
} }