diff --git a/packages/nuxt3/src/app/composables/cookie.ts b/packages/nuxt3/src/app/composables/cookie.ts index 3570cedbca..1a6602cce1 100644 --- a/packages/nuxt3/src/app/composables/cookie.ts +++ b/packages/nuxt3/src/app/composables/cookie.ts @@ -25,7 +25,7 @@ export function useCookie (name: string, _opts?: CookieOptions): C const opts = { ...CookieDefaults, ..._opts } const cookies = readRawCookies(opts) - const cookie = ref(cookies[name] ?? _opts.default?.()) + const cookie = ref(cookies[name] ?? opts.default?.()) if (process.client) { watch(cookie, () => { writeClientCookie(name, cookie.value, opts as CookieSerializeOptions) })