mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 15:50:32 +00:00
fix(nuxt): only skip refetching errors when hydrating (#23889)
This commit is contained in:
parent
ec708d9c81
commit
ba4361a0f0
@ -261,7 +261,7 @@ export function useAsyncData<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asyncData.error.value || (fetchOnServer && nuxt.isHydrating && hasCachedData())) {
|
if (fetchOnServer && nuxt.isHydrating && (asyncData.error.value || hasCachedData())) {
|
||||||
// 1. Hydration (server: true): no fetch
|
// 1. Hydration (server: true): no fetch
|
||||||
asyncData.pending.value = false
|
asyncData.pending.value = false
|
||||||
asyncData.status.value = asyncData.error.value ? 'error' : 'success'
|
asyncData.status.value = asyncData.error.value ? 'error' : 'success'
|
||||||
|
Loading…
Reference in New Issue
Block a user