From 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Mon Sep 17 00:00:00 2001 From: eight Date: Sat, 6 Oct 2018 15:40:07 +0800 Subject: [PATCH] fixup! Add: isCodeEmpty --- background/style-manager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/background/style-manager.js b/background/style-manager.js index a46733a4..a7b25b97 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -301,10 +301,12 @@ const styleManager = (() => { let code = ''; for (const section of data.sections) { if (urlMatchSection(url, section)) { - code += section.code; + if (!isCodeEmpty(section.code)) { + code += section.code; + } } } - return isCodeEmpty(code) ? null : code; + return code; } function isCodeEmpty(code) {