1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 11:22:38 +01:00

code review re. #695

This commit is contained in:
gorhill 2015-02-06 06:49:48 -05:00
parent 36f0b4dec9
commit 932f14bd6e

View File

@ -307,25 +307,19 @@
// Load all filter lists which are not disabled // Load all filter lists which are not disabled
var location; var location;
var filterlistLoadingCount = 0; while ( location = locations.pop() ) {
while ( filterlistCount !== 0 ) {
location = locations.pop()
if ( !location ) {
break;
}
// rhill 2013-12-09: // rhill 2013-12-09:
// Ignore list if disabled // Ignore list if disabled
// https://github.com/gorhill/httpswitchboard/issues/78 // https://github.com/gorhill/httpswitchboard/issues/78
if ( lists[location].off === false ) { if ( lists[location].off ) {
filterlistLoadingCount += 1; filterlistCount -= 1;
µb.assets.get(location, mergeBlacklist);
continue; continue;
} }
filterlistCount -= 1; µb.assets.get(location, mergeBlacklist);
} }
// https://github.com/gorhill/uBlock/issues/695 // https://github.com/gorhill/uBlock/issues/695
// It may happen not a single filter list is selected // It may happen not a single filter list is selected
if ( filterlistLoadingCount === 0 ) { if ( filterlistCount === 0 ) {
loadBlacklistsEnd(); loadBlacklistsEnd();
} }
}; };