mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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() ) {
|
for ( var tab of tabWatcher.tabs() ) {
|
||||||
var URI = tab.currentURI;
|
var URI = tab.currentURI;
|
||||||
|
|
||||||
// Probably isn't the best method to identify the source tab
|
// Probably isn't the best method to identify the source tab.
|
||||||
if ( URI.spec !== details.openerURL ) {
|
// 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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user