mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(nuxt): ensure runtimeConfig.public
is reactive on client (#28443)
This commit is contained in:
parent
e64f8c9f3d
commit
93801def67
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user