Skip to content

Commit

Permalink
Fix improperly unselecting imported lists
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gorhill committed May 11, 2023
1 parent c1ac09b commit 1a9a8aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/storage.js
Expand Up @@ -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; }
Expand Down

0 comments on commit 1a9a8aa

Please sign in to comment.