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.
pull/378/head
Alper Özışık 2016-11-21 08:57:45 +02:00 zatwierdzone przez GitHub
rodzic 068caad970
commit b7af16c313
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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