Skip to content

Commit

Permalink
fix: pass error-like objects (pinojs#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
aqemi committed Apr 24, 2024
1 parent 6f0ecf0 commit 975e27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pretty.js
Expand Up @@ -138,7 +138,7 @@ function pretty (inputData) {
}

// pino@7+ does not log this anymore
if (log.type === 'Error' && log.stack) {
if (log.type === 'Error' && typeof log.stack === 'string') {
const prettifiedErrorLog = prettifyErrorLog({ log, context: this.context })
if (this.singleLine) line += this.EOL
line += prettifiedErrorLog
Expand Down

0 comments on commit 975e27c

Please sign in to comment.