mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt)!: change statusCode
type to number for error page template (#6010)
This commit is contained in:
parent
bdbeb886ae
commit
92269dde44
@ -29,8 +29,8 @@ const stacktrace = (error.stack || '')
|
|||||||
}).map(i => `<span class="stack${i.internal ? ' internal' : ''}">${i.text}</span>`).join('\n')
|
}).map(i => `<span class="stack${i.internal ? ' internal' : ''}">${i.text}</span>`).join('\n')
|
||||||
|
|
||||||
// Error page props
|
// Error page props
|
||||||
const statusCode = String(error.statusCode || 500)
|
const statusCode = Number(error.statusCode || 500)
|
||||||
const is404 = statusCode === '404'
|
const is404 = statusCode === 404
|
||||||
|
|
||||||
const statusMessage = error.statusMessage ?? (is404 ? 'Page Not Found' : 'Internal Server Error')
|
const statusMessage = error.statusMessage ?? (is404 ? 'Page Not Found' : 'Internal Server Error')
|
||||||
const description = error.message || error.toString()
|
const description = error.message || error.toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user