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

Commit d7fa744

Browse files
authored
fix(util): Fix adding stack traces to Errors thrown as strings (#3687)
1 parent 0931c12 commit d7fa744

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function runFilenameOrFn_(
5353
err = new Error(err);
5454
} else {
5555
err = err as Error;
56-
if (err.stack) {
56+
if (!err.stack) {
5757
err.stack = new Error().stack;
5858
}
5959
}

0 commit comments

Comments
 (0)