We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef55fe9 commit 8a96929Copy full SHA for 8a96929
src/browser/extension/chromeAPIMock.js
@@ -38,7 +38,7 @@ if (
38
}
39
40
if (window.isElectron) {
41
- if (!chrome.storage.local) {
+ if (!chrome.storage.local || !chrome.storage.local.remove) {
42
chrome.storage.local = {
43
set(obj, callback) {
44
Object.keys(obj).forEach(key => {
@@ -56,6 +56,19 @@ if (window.isElectron) {
56
if (callback) {
57
callback(result);
58
59
+ },
60
+ // Electron ~ 1.4.6
61
+ remove(items, callback) {
62
+ if (!Array.isArray(items)) {
63
+ items.forEach(name => {
64
+ localStorage.removeItem(name);
65
+ });
66
+ } else {
67
+ localStorage.removeItem(items);
68
+ }
69
+ if (callback) {
70
+ callback();
71
72
73
};
74
0 commit comments