aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-05-09 01:16:27 -0400
committergorhill <rhill@raymondhill.net>2015-05-09 01:16:27 -0400
commitba8dd756c94e5d531c08b2b94936f41287806f01 (patch)
tree5e345892a7b9cbd9b4566f17928ea5aad76c5565 /platform
parentce6eb9b7ac22891112a95d057afe4b092bc1750b (diff)
downloaduBlock-ba8dd756c94e5d531c08b2b94936f41287806f01.zip
uBlock-ba8dd756c94e5d531c08b2b94936f41287806f01.tar.gz
uBlock-ba8dd756c94e5d531c08b2b94936f41287806f01.tar.bz2
this fixes #185
Diffstat (limited to 'platform')
-rw-r--r--platform/firefox/vapi-background.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js
index 147ed66..8556355 100644
--- a/platform/firefox/vapi-background.js
+++ b/platform/firefox/vapi-background.js
@@ -1071,7 +1071,7 @@ var httpObserver = {
var onBeforeRequest = vAPI.net.onBeforeRequest;
var type = this.typeMap[details.type] || 'other';
- if ( onBeforeRequest.types.has(type) === false ) {
+ if ( onBeforeRequest.types && onBeforeRequest.types.has(type) === false ) {
return false;
}
@@ -1270,7 +1270,9 @@ vAPI.net.registerListeners = function() {
// Since it's not used
this.onBeforeSendHeaders = null;
- this.onBeforeRequest.types = new Set(this.onBeforeRequest.types);
+ this.onBeforeRequest.types = this.onBeforeRequest.types ?
+ new Set(this.onBeforeRequest.types) :
+ null;
var shouldLoadListenerMessageName = location.host + ':shouldLoad';
var shouldLoadListener = function(e) {