mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
fix(nuxt): unref the default value of asyncData when clearing (#30041)
This commit is contained in:
parent
c0ecf746da
commit
db889f07c9
@ -538,7 +538,7 @@ function clearNuxtDataByKey (nuxtApp: NuxtApp, key: string): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nuxtApp._asyncData[key]) {
|
if (nuxtApp._asyncData[key]) {
|
||||||
nuxtApp._asyncData[key]!.data.value = resetAsyncDataToUndefined ? undefined : nuxtApp._asyncData[key]!._default()
|
nuxtApp._asyncData[key]!.data.value = resetAsyncDataToUndefined ? undefined : unref(nuxtApp._asyncData[key]!._default())
|
||||||
nuxtApp._asyncData[key]!.error.value = asyncDataDefaults.errorValue
|
nuxtApp._asyncData[key]!.error.value = asyncDataDefaults.errorValue
|
||||||
nuxtApp._asyncData[key]!.pending.value = false
|
nuxtApp._asyncData[key]!.pending.value = false
|
||||||
nuxtApp._asyncData[key]!.status.value = 'idle'
|
nuxtApp._asyncData[key]!.status.value = 'idle'
|
||||||
|
Loading…
Reference in New Issue
Block a user