diff --git a/add-on/src/lib/redirect-handler/blockOrObserve.ts b/add-on/src/lib/redirect-handler/blockOrObserve.ts index e73289c87..2a4728280 100644 --- a/add-on/src/lib/redirect-handler/blockOrObserve.ts +++ b/add-on/src/lib/redirect-handler/blockOrObserve.ts @@ -181,6 +181,9 @@ function validateIfRuleChanged (rule: browser.DeclarativeNetRequest.Rule): boole * Clean up all the rules, when extension is disabled. */ export async function cleanupRules (resetInMemory: boolean = false): Promise { + if (supportsBlock()) { + return + } const existingRules = await browser.declarativeNetRequest.getDynamicRules() const existingRulesIds = existingRules.map(({ id }): number => id) await browser.declarativeNetRequest.updateDynamicRules({ addRules: [], removeRuleIds: existingRulesIds })