From b42dfc8300fc0432ee29fc78e103907b56c5ad9d Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 14 Jan 2018 15:40:36 +0300 Subject: [PATCH] fixup bb34538d: decrement styles.length on delete --- background/storage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/background/storage.js b/background/storage.js index 8a88c3f4..97de7814 100644 --- a/background/storage.js +++ b/background/storage.js @@ -616,6 +616,7 @@ function updateFiltersCache(style) { const [, , matchUrl, , , strictRegexp] = key.split('\t'); if (!style.enabled) { delete styles[id]; + styles.length--; continue; } const matchUrlBase = matchUrl && matchUrl.includes('#') && matchUrl.split('#', 1)[0];