From 2fc418e98733790495e56f8befa470eaa68564f3 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Fri, 26 Oct 2018 07:22:49 -0500 Subject: [PATCH] Fix md5Url in getAll --- background/storage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background/storage.js b/background/storage.js index e3c7cfdf..a447676d 100644 --- a/background/storage.js +++ b/background/storage.js @@ -174,6 +174,7 @@ function getStyles(options) { return dbExec('getAll').then(event => { cachedStyles.list = event.target.result || []; + cachedStyles.list.forEach(fixUsoMd5Issue); cachedStyles.byId.clear(); for (const style of cachedStyles.list) { cachedStyles.byId.set(style.id, style); @@ -306,7 +307,7 @@ function filterStylesInternal({ const matchUrlBase = matchUrl && matchUrl.includes('#') && matchUrl.split('#', 1)[0]; let style; - for (let i = 0; (style = fixUsoMd5Issue(styles[i])); i++) { + for (let i = 0; (style = styles[i]); i++) { if ((enabled === null || style.enabled === enabled) && (md5Url === null || style.md5Url === md5Url) && (id === null || style.id === id)) {