mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Fix toggling of "no filtering" as default mode
A bad test prevented the "no filtering" by default mode to not take effect immediately when activated while no site had yet been set to "no filtering". It would however take effect as soon as a specific site would be excluded from "no filtering".
This commit is contained in:
parent
d7ae3a185e
commit
5936451082
1 changed files with 4 additions and 3 deletions
|
|
@ -559,7 +559,8 @@ async function filteringModesToDNR(modes) {
|
|||
return Promise.all(promises);
|
||||
}
|
||||
|
||||
const isDifferentAllowRules = (a, b) => {
|
||||
const isDifferentAllowRules = (a = [], b = []) => {
|
||||
if ( a.length !== b.length ) { return true; }
|
||||
const pp = [
|
||||
'requestDomains',
|
||||
'excludedRequestDomains',
|
||||
|
|
@ -567,8 +568,8 @@ const isDifferentAllowRules = (a, b) => {
|
|||
'excludedInitiatorDomains',
|
||||
];
|
||||
for ( const p of pp ) {
|
||||
const ac = a?.length && a[0].condition[p] || [];
|
||||
const bc = b?.length && b[0].condition[p] || [];
|
||||
const ac = a.length && a[0].condition[p] || [];
|
||||
const bc = b.length && b[0].condition[p] || [];
|
||||
if ( ac.join() !== bc.join() ) { return true; }
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue