Skip to content

Commit

Permalink
fix(api/internal/error.js): fix 'stack' value
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Jul 31, 2024
1 parent db30ec7 commit bdb9c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/internal/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ function installRuntimeError (PlatformError, isBaseError = false) {
}
// prepareStackTrace is already called there
if (target instanceof Error) {
target.stack = stack
target.stack = stack.join('\n')
} else {
const prepareStackTrace = Error.prepareStackTrace || globalThis.Error.prepareStackTrace
if (typeof prepareStackTrace === 'function') {
const callsites = createCallSites(target, stack)
const callsites = createCallSites(target, stack.join('\n'))
target.stack = prepareStackTrace(target, callsites)
} else {
target.stack = stack
target.stack = stack.join('\n')
}
}
}
Expand Down

0 comments on commit bdb9c36

Please sign in to comment.