mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
fix(nuxt): ensure runtimeConfig.public
is reactive on client (#28443)
This commit is contained in:
parent
acea730a6b
commit
f40e36a3fc
@ -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