mirror of https://github.com/gorhill/uBlock.git
this fixes dealing with browser objects with no valid URI
This commit is contained in:
parent
ba654596c8
commit
2ca1ed3b9c
|
@ -1561,8 +1561,12 @@ vAPI.net.registerListeners = function() {
|
|||
for ( var tab of tabWatcher.tabs() ) {
|
||||
var URI = tab.currentURI;
|
||||
|
||||
// Probably isn't the best method to identify the source tab
|
||||
if ( URI.spec !== details.openerURL ) {
|
||||
// Probably isn't the best method to identify the source tab.
|
||||
// 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 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue