1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

Fix sticky imported list after removal

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1803
This commit is contained in:
Raymond Hill 2021-11-08 12:49:03 -05:00
parent f55a53a890
commit 4efa6be96b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -146,17 +146,20 @@ import {
};
µb.saveUserSettings = function() {
// `externalLists` will be deprecated in some future, it is kept around
// for forward compatibility purpose, and should reflect the content of
// `importedLists`.
//
// https://github.com/uBlockOrigin/uBlock-issues/issues/1803
// Do this before computing modified settings.
this.userSettings.externalLists =
this.userSettings.importedLists.join('\n');
const toSave = this.getModifiedSettings(
this.userSettings,
this.userSettingsDefault
);
// `externalLists` will be deprecated in some future, it is kept around
// for forward compatibility purpose, and should reflect the content of
// `importedLists`.
this.userSettings.externalLists =
this.userSettings.importedLists.join('\n');
const toRemove = [];
for ( const key in this.userSettings ) {
if ( this.userSettings.hasOwnProperty(key) === false ) { continue; }