mirror of
https://github.com/less/less.js.git
synced 2026-01-25 15:18:03 -05:00
return callback values in parser to allow synchronous parsing
This commit is contained in:
@@ -472,10 +472,10 @@ less.Parser = function Parser(env) {
|
||||
e = new(LessError)(e, env);
|
||||
}
|
||||
|
||||
callback(e);
|
||||
return callback(e);
|
||||
}
|
||||
else {
|
||||
callback(null, root);
|
||||
return callback(null, root);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -483,7 +483,7 @@ less.Parser = function Parser(env) {
|
||||
new tree.importVisitor(this.imports, finish)
|
||||
.run(root);
|
||||
} else {
|
||||
finish();
|
||||
return finish();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user