Skip to content

Commit

Permalink
Handle missing error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Varache committed May 7, 2019
1 parent e1150f2 commit c0875e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/kart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ function handleError(e) {
if (process.env.DEBUG) {
console.error(e);
} else {
console.log(e.message.red);
const message = e.message || e.stack;
if (message) {
console.log(message.red);
} else {
console.error(e);
}
}
}

Expand Down

0 comments on commit c0875e8

Please sign in to comment.