1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

code review of #3073

This commit is contained in:
gorhill 2017-09-30 08:07:10 -04:00
parent 526ffe214d
commit b3e4caa59f
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -351,10 +351,11 @@ vAPI.tabs.registerListeners = function() {
// https://github.com/gorhill/uBlock/issues/3073
// - Fall back to `tab.url` when `changeInfo.url` is not set.
var onUpdated = function(tabId, changeInfo, tab) {
if ( typeof changeInfo.url !== 'string' ) {
changeInfo.url = tab && tab.url;
}
if ( changeInfo.url ) {
changeInfo.url = sanitizeURL(changeInfo.url);
} else {
changeInfo.url = tab && tab.url;
}
onUpdatedClient(tabId.toString(), changeInfo, tab);
};