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

Commit

Permalink
fix(util): check stack exists before filtering the stack trace (#3309)
Browse files Browse the repository at this point in the history
closes #3224
  • Loading branch information
cnishina authored and heathkit committed Jun 28, 2016
1 parent c86acd4 commit ba63a92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export function runFilenameOrFn_(
}
if (typeof filenameOrFn === 'function') {
let results = when(filenameOrFn.apply(null, args), null, (err) => {
err.stack = exports.filterStackTrace(err.stack);
if (err.stack) {
err.stack = exports.filterStackTrace(err.stack);
}
throw err;
});
resolvePromise(results);
Expand Down

0 comments on commit ba63a92

Please sign in to comment.