From ba4361a0f05b1f101ea3740ae093a43e14ca39ab Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 23 Oct 2023 23:04:45 +0900 Subject: [PATCH] fix(nuxt): only skip refetching errors when hydrating (#23889) --- packages/nuxt/src/app/composables/asyncData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/app/composables/asyncData.ts b/packages/nuxt/src/app/composables/asyncData.ts index 9978172c62..413f98f52c 100644 --- a/packages/nuxt/src/app/composables/asyncData.ts +++ b/packages/nuxt/src/app/composables/asyncData.ts @@ -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 asyncData.pending.value = false asyncData.status.value = asyncData.error.value ? 'error' : 'success'