mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
for unlikely case where two lists are merged into one
This commit is contained in:
parent
d6608e8cf9
commit
6b32efb67b
1 changed files with 6 additions and 1 deletions
|
|
@ -214,20 +214,25 @@
|
||||||
var lists = store.remoteBlacklists;
|
var lists = store.remoteBlacklists;
|
||||||
var locations = Object.keys(lists);
|
var locations = Object.keys(lists);
|
||||||
var location, availableEntry, storedEntry;
|
var location, availableEntry, storedEntry;
|
||||||
|
var off;
|
||||||
|
|
||||||
while ( location = locations.pop() ) {
|
while ( location = locations.pop() ) {
|
||||||
storedEntry = lists[location];
|
storedEntry = lists[location];
|
||||||
|
off = storedEntry.off === true;
|
||||||
// New location?
|
// New location?
|
||||||
if ( relocationMap.hasOwnProperty(location) ) {
|
if ( relocationMap.hasOwnProperty(location) ) {
|
||||||
µb.purgeFilterList(location);
|
µb.purgeFilterList(location);
|
||||||
location = relocationMap[location];
|
location = relocationMap[location];
|
||||||
|
if ( off && lists.hasOwnProperty(location) ) {
|
||||||
|
off = lists[location].off === true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
availableEntry = availableLists[location];
|
availableEntry = availableLists[location];
|
||||||
if ( availableEntry === undefined ) {
|
if ( availableEntry === undefined ) {
|
||||||
µb.purgeFilterList(location);
|
µb.purgeFilterList(location);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
availableEntry.off = storedEntry.off || false;
|
availableEntry.off = off;
|
||||||
µb.assets.setHomeURL(location, availableEntry.homeURL);
|
µb.assets.setHomeURL(location, availableEntry.homeURL);
|
||||||
if ( storedEntry.entryCount !== undefined ) {
|
if ( storedEntry.entryCount !== undefined ) {
|
||||||
availableEntry.entryCount = storedEntry.entryCount;
|
availableEntry.entryCount = storedEntry.entryCount;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue