Skip to content

Commit

Permalink
Return earlyif Error.stack is undefined as it's non standard
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Apr 23, 2024
1 parent 7287a4b commit 1ebe5f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ class Logger {

try {
const err = new Error()

if (!err.stack) {
return
}

Error.prepareStackTrace = function (_, stack) {
return stack
}
Expand Down

0 comments on commit 1ebe5f6

Please sign in to comment.