Skip to content

Commit

Permalink
Make sure we have a valid error message
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Nov 14, 2020
1 parent 80ed9a9 commit 10cfbce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webpack/util/createStatsFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export default function createStatsFormatter(rootPath: string) {
lines.push('')
}

lines.push(formatErrorMessage(err.message))
// Make sure we have a valid error message
if (err.message && typeof err.message === 'string') {
lines.push(formatErrorMessage(err.message))
}

return lines.join(EOL)
}
Expand Down

0 comments on commit 10cfbce

Please sign in to comment.