diff --git a/lib/app/server.js b/lib/app/server.js index 2322298049..b238d3bbd3 100644 --- a/lib/app/server.js +++ b/lib/app/server.js @@ -76,9 +76,9 @@ export default async ssrContext => { await beforeRender() return _app } - const render404Page = async () => { + const render404Page = () => { app.context.error({ statusCode: 404, message: '<%= messages.error_404 %>' }) - return await renderErrorPage() + return renderErrorPage() } <% if (isDev) { %>const s = isDev && Date.now()<% } %> @@ -100,7 +100,7 @@ export default async ssrContext => { } // ...If there is a redirect or an error, stop the process if (ssrContext.redirected) return noopApp() - if (ssrContext.nuxt.error) return await renderErrorPage() + if (ssrContext.nuxt.error) return renderErrorPage() <% } %> /* @@ -117,7 +117,7 @@ export default async ssrContext => { await middlewareSeries(midd, app.context) // ...If there is a redirect or an error, stop the process if (ssrContext.redirected) return noopApp() - if (ssrContext.nuxt.error) return await renderErrorPage() + if (ssrContext.nuxt.error) return renderErrorPage() /* ** Set layout @@ -149,7 +149,7 @@ export default async ssrContext => { await middlewareSeries(midd, app.context) // ...If there is a redirect or an error, stop the process if (ssrContext.redirected) return noopApp() - if (ssrContext.nuxt.error) return await renderErrorPage() + if (ssrContext.nuxt.error) return renderErrorPage() /* ** Call .validate() @@ -210,7 +210,7 @@ export default async ssrContext => { // ...If there is a redirect or an error, stop the process if (ssrContext.redirected) return noopApp() - if (ssrContext.nuxt.error) return await renderErrorPage() + if (ssrContext.nuxt.error) return renderErrorPage() // Call beforeNuxtRender methods & add store state await beforeRender() diff --git a/lib/app/utils.js b/lib/app/utils.js index a7b6603de0..f2a707f0f3 100644 --- a/lib/app/utils.js +++ b/lib/app/utils.js @@ -73,8 +73,8 @@ export function flatMapComponents(route, fn) { })) } -export async function resolveRouteComponents(route) { - return await Promise.all( +export function resolveRouteComponents(route) { + return Promise.all( flatMapComponents(route, async (Component, _, match, key) => { // If component is a function, resolve it if (typeof Component === 'function' && !Component.options) {