diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 247d5c3cd..01dbb2b84 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -1157,11 +1157,10 @@ vAPI.Net = class { browser.webRequest.onBeforeRequest.addListener( details => { this.normalizeDetails(details); - if ( this.suspendDepth === 0 ) { + if ( this.suspendDepth === 0 || details.tabId < 0 ) { if ( this.suspendableListener === undefined ) { return; } return this.suspendableListener(details); } - if ( details.tabId < 0 ) { return; } return this.suspendOneRequest(details); }, this.denormalizeFilters({ urls: [ 'http://*/*', 'https://*/*' ] }), diff --git a/platform/firefox/vapi-webrequest.js b/platform/firefox/vapi-webrequest.js index 9bc4def66..b3c379a3e 100644 --- a/platform/firefox/vapi-webrequest.js +++ b/platform/firefox/vapi-webrequest.js @@ -115,7 +115,7 @@ resolve: undefined, promise: undefined }; - pending.promise = new Promise(function(resolve) { + pending.promise = new Promise(resolve => { pending.resolve = resolve; }); this.pendingRequests.push(pending);