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 013f9b2..ca2038f 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -353,7 +353,7 @@ var RequestGuard = (() => { !ns.isEnforced(request.tabId) || policy.can(url, policyType, originUrl); Content.reportTo(request, allowed, policyType); - + if (!allowed) { debug(`Blocking ${policyType}`, request); TabStatus.record(request, "blocked"); @@ -477,7 +477,8 @@ var RequestGuard = (() => { ); debug("%s scriptBlocked=%s setting noscriptFrame on ", request.url, scriptBlocked, request.tabId, request.frameId); TabStatus.record(request, "noscriptFrame", scriptBlocked); - pendingRequests.get(request.requestId).scriptBlocked = scriptBlocked; + let pending = pendingRequests.get(request.requestId); + if (pending) pending.scriptBlocked = scriptBlocked; }, onCompleted(request) { |