From 2018a5957a8d044a6394f215c7ab26386a3140fa Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 22 Oct 2024 00:34:55 +0200 Subject: [PATCH] Fixed computedChildPolicy() regression on missing tab url. --- src/bg/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bg/main.js b/src/bg/main.js index 7cfc3c5..fbcf0d2 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -295,7 +295,7 @@ }, computeChildPolicy({url, contextUrl}, sender) { - const {tab, frameId} = sender; + let {tab} = sender; let policy = ns.policy; const {isTorBrowser} = ns.local; if (!policy) { @@ -311,7 +311,7 @@ const tabId = tab ? tab.id : -1; let topUrl; - if (frameId === 0) { + if (sender.frameId === 0) { topUrl = url; } else if (tab) { if (!tab.url) tab = TabCache.get(tabId);