mirror of
https://github.com/less/less.js.git
synced 2026-02-05 20:44:58 -05:00
Fix callback called two times
This commit is contained in:
@@ -309,17 +309,21 @@ less.Parser = function Parser(env) {
|
||||
}
|
||||
}
|
||||
if (level > 0) {
|
||||
return callback(new(LessError)({
|
||||
error = new(LessError)({
|
||||
index: i,
|
||||
type: 'Parse',
|
||||
message: "missing closing `}`",
|
||||
filename: env.filename
|
||||
}, env));
|
||||
}, env);
|
||||
}
|
||||
|
||||
return chunks.map(function (c) { return c.join('') });;
|
||||
})([[]]);
|
||||
|
||||
if (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Start with the primary rule.
|
||||
// The whole syntax tree is held under a Ruleset node,
|
||||
// with the `root` property set to true, so no `{}` are
|
||||
|
||||
Reference in New Issue
Block a user