From bd34a8c1582b9be0fb74ef27b1e7ab07c2911736 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 21 Jun 2023 11:04:44 +0100 Subject: [PATCH] fix(nuxt): do not embed error path in payload (#21671) --- packages/nuxt/src/app/nuxt.ts | 2 +- packages/nuxt/src/core/runtime/nitro/renderer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index bb7d2a25d9..e317f7908e 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -266,7 +266,7 @@ export function createNuxtApp (options: CreateOptions) { // Expose payload types nuxtApp.ssrContext._payloadReducers = {} // Expose current path - nuxtApp.payload.path = nuxtApp.ssrContext.event.path + nuxtApp.payload.path = nuxtApp.ssrContext.url } // Expose to server renderer to create payload nuxtApp.ssrContext = nuxtApp.ssrContext || {} as any diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index 572d207ba8..a2a93fbfc0 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -127,7 +127,7 @@ const getSPARenderer = lazyCachedFunction(async () => { const renderToString = (ssrContext: NuxtSSRContext) => { const config = useRuntimeConfig() ssrContext!.payload = { - path: ssrContext.event.path, + path: ssrContext.url, _errors: {}, serverRendered: false, data: {},