From 7a00310934959cfdafe032c4584f0b24b6b40f5d Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 7 Jul 2015 09:10:53 -0400 Subject: [PATCH] this may fix #450 --- platform/firefox/vapi-background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 0b1ac9608..edae6d5dd 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1803,11 +1803,14 @@ vAPI.net.registerListeners = function() { var URI = browser.currentURI; // Probably isn't the best method to identify the source tab. + + // https://github.com/gorhill/uBlock/issues/450 + // Skip entry if no valid URI available. // Apparently URI can be undefined under some circumstances: I // believe this may have to do with those very temporary // browser objects created when opening a new tab, i.e. related // to https://github.com/gorhill/uBlock/issues/212 - if ( URI && URI.spec !== details.openerURL ) { + if ( !URI || URI.spec !== details.openerURL ) { continue; }