mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fix: Fix context undefined
This commit is contained in:
parent
e15c92f1c8
commit
76aca28cdc
@ -203,8 +203,8 @@ async function render (to, from, next) {
|
||||
if (app.context._redirected) return
|
||||
// Load layout for error page
|
||||
const layout = await this.loadLayout(typeof NuxtError.layout === 'function' ? NuxtError.layout(app.context) : NuxtError.layout)
|
||||
await callMiddleware.call(this, Components, context, layout)
|
||||
if (context._redirected) return
|
||||
await callMiddleware.call(this, Components, app.context, layout)
|
||||
if (app.context._redirected) return
|
||||
// Show error page
|
||||
app.context.error({ statusCode: 404, message: '<%= messages.error_404 %>' })
|
||||
return next()
|
||||
|
Loading…
Reference in New Issue
Block a user