From 3057a04ef0f5e51c3b405bae96663dfdc2aa4653 Mon Sep 17 00:00:00 2001 From: Seno <4535187+s-en-o@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:34:41 +1200 Subject: [PATCH] fix(nuxt): improve async data warning (#27874) (#27934) --- 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 c328f33864..2a68ac0932 100644 --- a/packages/nuxt/src/app/composables/asyncData.ts +++ b/packages/nuxt/src/app/composables/asyncData.ts @@ -313,7 +313,7 @@ export function useAsyncData< if (import.meta.dev && import.meta.server && !result) { // @ts-expect-error private property - console.warn(`[nuxt] \`${options._functionName || 'useAsyncData'}\` should return a value that is not \`null\` or \`undefined\` or the request may be duplicated on the client side.`) + console.warn(`[nuxt] \`${options._functionName || 'useAsyncData'}\` must return a truthy value (for example, it should not be \`undefined\`, \`null\` or empty string) or the request may be duplicated on the client side.`) } nuxtApp.payload.data[key] = result