From 05fd0a5b72521a8096cf3c8176d38c1829e6152e Mon Sep 17 00:00:00 2001 From: Krzysztof Modras Date: Tue, 19 Nov 2024 15:14:01 +0100 Subject: [PATCH] Cleanup --- src/background/adblocker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/background/adblocker.js b/src/background/adblocker.js index d0bb0a64d..3ce4e9fda 100644 --- a/src/background/adblocker.js +++ b/src/background/adblocker.js @@ -86,7 +86,9 @@ export async function reloadMainEngine() { await engines.create(engines.MAIN_ENGINE); console.info('[adblocker] Main engine reloaded with no filters'); } - contentScripts.clear(); + if (__PLATFORM__ === 'firefox') { + contentScripts.clear(); + } } let updating = false; @@ -172,6 +174,7 @@ const contentScripts = (() => { const map = new Map(); return { set(key, value) { + this.delete(key); map.set(key, value); }, has(key) {