Fix for undefined error log in console

When css|less build fails it is logging as undefined in console.
In that case err object does not have any stack property.
Printing the error itself in that case will be sufficient.
This commit is contained in:
Alper Özışık 2016-11-21 08:57:45 +02:00 committed by GitHub
parent 068caad970
commit b7af16c313

View File

@ -115,7 +115,7 @@ function plugin(options, imports, register) {
var accept = req.headers.accept || '';
if (statusCode == 500) {
console.error(err && err.stack);
console.error(err && (err.stack || err));
emitter.emit("internalServerError", {
err: err,
req: req