Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt)!: provide error code as number
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 20, 2022
1 parent 88f4525 commit 0440025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/components/nuxt-error-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const stacktrace = (error.stack || '')
}).map(i => `<span class="stack${i.internal ? ' internal' : ''}">${i.text}</span>`).join('\n')
// Error page props
const statusCode = String(error.statusCode || 500)
const is404 = statusCode === '404'
const statusCode = Number(error.statusCode || 500)
const is404 = statusCode === 404
const statusMessage = error.statusMessage ?? (is404 ? 'Page Not Found' : 'Internal Server Error')
const description = error.message || error.toString()
Expand Down

0 comments on commit 0440025

Please sign in to comment.