Skip to content

Commit

Permalink
fix: Fix context undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Oct 31, 2017
1 parent e15c92f commit 76aca28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/app/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 76aca28

Please sign in to comment.