From ae60293e00400e7e733c19d0ea4ebb489fb54dc6 Mon Sep 17 00:00:00 2001 From: eight Date: Sun, 2 Sep 2018 12:37:22 +0800 Subject: [PATCH] Fix: one-liner --- edit/linter-meta.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/edit/linter-meta.js b/edit/linter-meta.js index 99cacfd5..ab6cdafe 100644 --- a/edit/linter-meta.js +++ b/edit/linter-meta.js @@ -18,7 +18,8 @@ function createMetaCompiler(cm) { if (match[0] === meta && match.index === metaIndex) { return cache; } - return parseMeta(match[0]) + return API.parseUsercss({sourceCode: match[0], metaOnly: true}) + .then(result => result.usercssData) .then(result => { for (const cb of successCallbacks) { cb(result); @@ -43,9 +44,4 @@ function createMetaCompiler(cm) { return { onSuccess: cb => successCallbacks.push(cb) }; - - function parseMeta(meta) { - return API.parseUsercss({sourceCode: meta, metaOnly: true}) - .then(result => result.usercssData); - } }