diff --git a/background/usercss-helper.js b/background/usercss-helper.js index dd7d61d5..274ff37c 100644 --- a/background/usercss-helper.js +++ b/background/usercss-helper.js @@ -62,7 +62,8 @@ } function save(style) { - if (!style.sourceCode) { + // restore if stripped by getStyleWithNoCode + if (typeof style.sourceCode !== 'string') { style.sourceCode = cachedStyles.byId.get(style.id).sourceCode; } return buildMeta(style)