Skip to content

Commit 2065f14

Browse files
committed
Support for chrome.runtime.onInstalled on Firefox
1 parent a244e25 commit 2065f14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/browser/extension/chromeAPIMock.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ if (
3131
};
3232
} else {
3333
chrome.storage.sync = chrome.storage.local;
34-
chrome.runtime.onInstalled = {
35-
addListener: cb => cb()
36-
};
34+
if (!chrome.runtime.onInstalled) {
35+
chrome.runtime.onInstalled = {
36+
addListener: cb => cb()
37+
};
38+
}
3739
}
3840
}
3941

0 commit comments

Comments
 (0)