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 4bd0556 commit 3b06d72Copy full SHA for 3b06d72
src/background.ts
@@ -204,9 +204,13 @@ async function registerFirefoxContentScript(options: Registration) {
204
*/
205
async function unregisterFirefoxContentScript(id: string) {
206
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) {
207
- await chromeP.scripting.unregisterContentScripts({
208
- ids: [id]
209
- });
+ try {
+ await chromeP.scripting.unregisterContentScripts({
+ ids: [id]
210
+ });
211
+ } catch (e) {
212
+ // Already registered
213
+ }
214
} else {
215
if (contentScriptRegistrations[id]) {
216
contentScriptRegistrations[id].unregister();
0 commit comments