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

for unlikely case where two lists are merged into one

This commit is contained in:
gorhill 2015-04-18 00:43:32 -04:00
parent d6608e8cf9
commit 6b32efb67b

View File

@ -214,20 +214,25 @@
var lists = store.remoteBlacklists;
var locations = Object.keys(lists);
var location, availableEntry, storedEntry;
var off;
while ( location = locations.pop() ) {
storedEntry = lists[location];
off = storedEntry.off === true;
// New location?
if ( relocationMap.hasOwnProperty(location) ) {
µb.purgeFilterList(location);
location = relocationMap[location];
if ( off && lists.hasOwnProperty(location) ) {
off = lists[location].off === true;
}
}
availableEntry = availableLists[location];
if ( availableEntry === undefined ) {
µb.purgeFilterList(location);
continue;
}
availableEntry.off = storedEntry.off || false;
availableEntry.off = off;
µb.assets.setHomeURL(location, availableEntry.homeURL);
if ( storedEntry.entryCount !== undefined ) {
availableEntry.entryCount = storedEntry.entryCount;