diff options
Diffstat (limited to 'src/bg')
-rw-r--r-- | src/bg/RequestGuard.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 8214a3d..92f32b0 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -263,8 +263,9 @@ var RequestGuard = (() => { let policyType = policyTypesMap[request.type]; if (policyType) { let {url, originUrl, documentUrl} = request; - if (("fetch" === policyType || "frame" === policyType) && - (((!originUrl || url === originUrl) && originUrl === documentUrl + let isFetch = "fetch" === policyType; + if ((isFetch || "frame" === policyType) && + (((isFetch && !originUrl || url === originUrl) && originUrl === documentUrl // some extensions make them both undefined, // see https://github.com/eight04/image-picka/issues/150 ) || |