1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Ignore unused tabs.onUpdated() events

This commit is contained in:
Raymond Hill 2021-10-17 12:55:31 -04:00
parent 9f693c75c7
commit e4d75fa025
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -524,9 +524,12 @@ vAPI.Tabs = class {
}
onUpdatedHandler(tabId, changeInfo, tab) {
// Ignore uninteresting update events
const { status = '', title = '', url = '' } = changeInfo;
if ( status === '' && title === '' && url === '' ) { return; }
// https://github.com/gorhill/uBlock/issues/3073
// Fall back to `tab.url` when `changeInfo.url` is not set.
if ( typeof changeInfo.url !== 'string' ) {
if ( url === '' ) {
changeInfo.url = tab && tab.url;
}
if ( changeInfo.url ) {