From 450cd60aeb28c3c99d69c8b37043554a840077bb Mon Sep 17 00:00:00 2001 From: eight Date: Sat, 6 Oct 2018 15:22:04 +0800 Subject: [PATCH] Fix: ignore comment block --- background/style-manager.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/background/style-manager.js b/background/style-manager.js index f50d046e..d3e350a7 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -1,7 +1,7 @@ /* eslint no-eq-null: 0, eqeqeq: [2, "smart"] */ /* global createCache db calcStyleDigest normalizeStyleSections db promisify - getStyleWithNoCode msg + getStyleWithNoCode msg styleCodeEmpty */ 'use strict'; @@ -281,7 +281,7 @@ const styleManager = (() => { cache[data.id] = { id: data.id, enabled: data.enabled, - sections: code + code }; appliesTo.add(url); } @@ -304,8 +304,7 @@ const styleManager = (() => { code += section.code; } } - // FIXME: trim comment? - return code; + return styleCodeEmpty(code) ? null : code; } function prepare() {