mirror of https://github.com/gorhill/uBlock.git
code review of #3073
This commit is contained in:
parent
526ffe214d
commit
b3e4caa59f
|
@ -351,10 +351,11 @@ vAPI.tabs.registerListeners = function() {
|
||||||
// https://github.com/gorhill/uBlock/issues/3073
|
// https://github.com/gorhill/uBlock/issues/3073
|
||||||
// - Fall back to `tab.url` when `changeInfo.url` is not set.
|
// - Fall back to `tab.url` when `changeInfo.url` is not set.
|
||||||
var onUpdated = function(tabId, changeInfo, tab) {
|
var onUpdated = function(tabId, changeInfo, tab) {
|
||||||
|
if ( typeof changeInfo.url !== 'string' ) {
|
||||||
|
changeInfo.url = tab && tab.url;
|
||||||
|
}
|
||||||
if ( changeInfo.url ) {
|
if ( changeInfo.url ) {
|
||||||
changeInfo.url = sanitizeURL(changeInfo.url);
|
changeInfo.url = sanitizeURL(changeInfo.url);
|
||||||
} else {
|
|
||||||
changeInfo.url = tab && tab.url;
|
|
||||||
}
|
}
|
||||||
onUpdatedClient(tabId.toString(), changeInfo, tab);
|
onUpdatedClient(tabId.toString(), changeInfo, tab);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue