fixup! Add: isCodeEmpty

This commit is contained in:
eight 2018-10-06 15:40:07 +08:00
parent 1cf6008514
commit 583ca31d97

View File

@ -301,10 +301,12 @@ const styleManager = (() => {
let code = ''; let code = '';
for (const section of data.sections) { for (const section of data.sections) {
if (urlMatchSection(url, section)) { if (urlMatchSection(url, section)) {
code += section.code; if (!isCodeEmpty(section.code)) {
code += section.code;
}
} }
} }
return isCodeEmpty(code) ? null : code; return code;
} }
function isCodeEmpty(code) { function isCodeEmpty(code) {