10000 Make parse error handler more robust · recomputing/less.js@a8802fc · GitHub
[go: up one dir, main page]

Skip to content

Commit a8802fc

Browse files
committed
Make parse error handler more robust
This is necessary to get useful error messages in cases where root has not been constructed successfully.
1 parent 557177c commit a8802fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/less/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var less = {
1919

2020
if (callback) {
2121
parser.parse(input, function (e, root) {
22-
callback(e, root.toCSS(options));
22+
callback(e, root && root.toCSS && root.toCSS(options));
2323
});
2424
} else {
2525
ee = new(require('events').EventEmitter);

0 commit comments

Comments
 (0)
0