mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix edge case of background image filter and no cosmetic filters
Related commit: -ebaa8a8bb2Related feedback: -ebaa8a8bb2 (commitcomment-63818019)
This commit is contained in:
parent
ebaa8a8bb2
commit
9759bfef4e
1 changed files with 12 additions and 0 deletions
|
|
@ -566,6 +566,18 @@ const filtersFrom = function(x, y) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/commit/ebaa8a8bb28aef043a68c99965fe6c128a3fe5e4#commitcomment-63818019
|
||||||
|
// If still no best candidate, just use whatever is available in network
|
||||||
|
// filter candidates -- which may have been previously skipped in favor
|
||||||
|
// of cosmetic filters.
|
||||||
|
if ( bestCandidateFilter === null && netFilterCandidates.length !== 0 ) {
|
||||||
|
bestCandidateFilter = {
|
||||||
|
type: 'net',
|
||||||
|
filters: netFilterCandidates,
|
||||||
|
slot: 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return netFilterCandidates.length + cosmeticFilterCandidates.length;
|
return netFilterCandidates.length + cosmeticFilterCandidates.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue