mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Fix improperly unselecting imported lists
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/13enzvv/ When assessing which default lists to disable/enable after updating from 1.48.x to 1.49.x, uBO has to ignore imported lists, as these do not have a `off` property -- the non-existence of this property was used to determine whether a list was default or not. There needs to be an extra test for whether the list is imported or not.
This commit is contained in:
parent
c1ac09b96a
commit
1a9a8aae0c
1 changed files with 5 additions and 1 deletions
|
@ -1625,7 +1625,11 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
if ( newDefaultListset.size === 0 ) { return; }
|
||||
if ( oldDefaultListset.size === 0 ) {
|
||||
Array.from(Object.entries(oldDict))
|
||||
.filter(a => a[1].content === 'filters' && a[1].off === undefined)
|
||||
.filter(a =>
|
||||
a[1].content === 'filters' &&
|
||||
a[1].off === undefined &&
|
||||
/^https?:\/\//.test(a[0]) === false
|
||||
)
|
||||
.map(a => a[0])
|
||||
.forEach(a => oldDefaultListset.add(a));
|
||||
if ( oldDefaultListset.size === 0 ) { return; }
|
||||
|
|
Loading…
Reference in a new issue