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

Commit

Permalink
fix(nuxt)!: change statusCode type to number for error page template (
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jul 20, 2022
1 parent bdbeb88 commit 92269dd
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 92269dd

Please sign in to comment.