fixup bb34538d: decrement styles.length on delete

This commit is contained in:
tophf 2018-01-14 15:40:36 +03:00
parent eabfaca08e
commit b42dfc8300

View File

@ -616,6 +616,7 @@ function updateFiltersCache(style) {
const [, , matchUrl, , , strictRegexp] = key.split('\t'); const [, , matchUrl, , , strictRegexp] = key.split('\t');
if (!style.enabled) { if (!style.enabled) {
delete styles[id]; delete styles[id];
styles.length--;
continue; continue;
} }
const matchUrlBase = matchUrl && matchUrl.includes('#') && matchUrl.split('#', 1)[0]; const matchUrlBase = matchUrl && matchUrl.includes('#') && matchUrl.split('#', 1)[0];