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

Commit ba63a92

Browse files
cnishinaheathkit
authored andcommitted
fix(util): check stack exists before filtering the stack trace (#3309)
closes #3224
1 parent c86acd4 commit ba63a92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/util.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export function runFilenameOrFn_(
4949
}
5050
if (typeof filenameOrFn === 'function') {
5151
let results = when(filenameOrFn.apply(null, args), null, (err) => {
52-
err.stack = exports.filterStackTrace(err.stack);
52+
if (err.stack) {
53+
err.stack = exports.filterStackTrace(err.stack);
54+
}
5355
throw err;
5456
});
5557
resolvePromise(results);

0 commit comments

Comments
 (0)