Fix: one-liner
This commit is contained in:
parent
6f26fb4461
commit
ae60293e00
|
@ -18,7 +18,8 @@ function createMetaCompiler(cm) {
|
||||||
if (match[0] === meta && match.index === metaIndex) {
|
if (match[0] === meta && match.index === metaIndex) {
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
return parseMeta(match[0])
|
return API.parseUsercss({sourceCode: match[0], metaOnly: true})
|
||||||
|
.then(result => result.usercssData)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
for (const cb of successCallbacks) {
|
for (const cb of successCallbacks) {
|
||||||
cb(result);
|
cb(result);
|
||||||
|
@ -43,9 +44,4 @@ function createMetaCompiler(cm) {
|
||||||
return {
|
return {
|
||||||
onSuccess: cb => successCallbacks.push(cb)
|
onSuccess: cb => successCallbacks.push(cb)
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseMeta(meta) {
|
|
||||||
return API.parseUsercss({sourceCode: meta, metaOnly: true})
|
|
||||||
.then(result => result.usercssData);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user