diff --git a/packages/nuxt/src/app/composables/payload.ts b/packages/nuxt/src/app/composables/payload.ts index 69cd0919db..558a50886a 100644 --- a/packages/nuxt/src/app/composables/payload.ts +++ b/packages/nuxt/src/app/composables/payload.ts @@ -1,7 +1,7 @@ import { hasProtocol, joinURL, withoutTrailingSlash } from 'ufo' import { parse } from 'devalue' import { useHead } from '@unhead/vue' -import { getCurrentInstance, onServerPrefetch } from 'vue' +import { getCurrentInstance, onServerPrefetch, reactive } from 'vue' import { useNuxtApp, useRuntimeConfig } from '../nuxt' import type { NuxtPayload } from '../nuxt' @@ -122,6 +122,10 @@ export async function getNuxtClientPayload () { ...window.__NUXT__, } + if (payloadCache!.config?.public) { + payloadCache!.config.public = reactive(payloadCache!.config.public) + } + return payloadCache }