From 76aca28cdc53ae7fccb7e4aaa3e1de7f2bc18381 Mon Sep 17 00:00:00 2001 From: Atinux Date: Tue, 31 Oct 2017 18:32:42 +0100 Subject: [PATCH] fix: Fix context undefined --- lib/app/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app/client.js b/lib/app/client.js index 63e22c585e..c2da03ceb1 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -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()