From 650cf3521bbb55a9ec96b6d4bccd897b505d11d9 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 10 Jan 2018 21:54:59 +0300 Subject: [PATCH] correctly strip 'code' from style hash --- background/storage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/background/storage.js b/background/storage.js index c95b9652..f761bc13 100644 --- a/background/storage.js +++ b/background/storage.js @@ -249,9 +249,9 @@ function filterStyles({ if (!omitCode) return styles; if (!asHash) return styles.map(getStyleWithNoCode); for (const id in styles) { - const style = styles[id]; - if (style && style.sections) { - styles[id] = getStyleWithNoCode(style); + const sections = styles[id]; + if (Array.isArray(sections)) { + styles[id] = getStyleWithNoCode({sections}).sections; } } return styles;