Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(util): Fix adding stack traces to Errors thrown as strings (#3687)
Browse files Browse the repository at this point in the history
  • Loading branch information
heathkit authored Oct 31, 2016
1 parent 0931c12 commit d7fa744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function runFilenameOrFn_(
err = new Error(err);
} else {
err = err as Error;
if (err.stack) {
if (!err.stack) {
err.stack = new Error().stack;
}
}
Expand Down

0 comments on commit d7fa744

Please sign in to comment.