parser.imports passing errors

parser.imports stored any errors in .error, but only returned an error to the callback on that last import in the queue.

This commit makes it return the stored error (that.error).

issue #463
This commit is contained in:
Damien Whitten
2012-11-30 11:09:11 +11:00
committed by Luke Page
parent 8325548b7f
commit 90882cd070

View File

@@ -99,7 +99,7 @@ less.Parser = function Parser(env) {
callback(e, root, imported);
if (that.queue.length === 0) { finish(e) } // Call `finish` if we're done importing
if (that.queue.length === 0) { finish(that.error) } // Call `finish` if we're done importing
}, env);
}
};