From 6b32efb67b8ed34e376ea732b038bcc4bf90aa43 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 18 Apr 2015 00:43:32 -0400 Subject: [PATCH] for unlikely case where two lists are merged into one --- src/js/storage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/storage.js b/src/js/storage.js index 1e3271a68..943427cb8 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -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;