Skip to content

Commit

Permalink
[[FIX]] Check stack in Error instances
Browse files Browse the repository at this point in the history
  • Loading branch information
jmendiara committed Oct 11, 2016
1 parent 8ed104e commit e9a2c24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function formatObject(error) {
}

function formatStack(error) {
if (error instanceof Error) {
if (error instanceof Error && error.stack != null) {
var stack = error.stack;
return stack.substring(stack.indexOf('\n') + 1);
}
Expand Down

0 comments on commit e9a2c24

Please sign in to comment.