diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index 42bc000dd3..7aa3a6c994 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -144,7 +144,7 @@ export function useFetch< watch: watch === false ? [] : [_fetchOptions, _request, ...(watch || [])], } - if (import.meta.dev && import.meta.client) { + if (import.meta.dev && import.meta.server) { // @ts-expect-error private property _asyncDataOptions._functionName = opts._functionName || 'useFetch' } @@ -227,7 +227,7 @@ export function useLazyFetch< ) { const [opts = {}, autoKey] = typeof arg1 === 'string' ? [{}, arg1] : [arg1, arg2] - if (import.meta.dev && import.meta.client) { + if (import.meta.dev && import.meta.server) { // @ts-expect-error private property opts._functionName ||= 'useLazyFetch' }