From 6a25d3e245a88d3c838dafa643a5210dba625d73 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 2 Dec 2021 11:29:26 +0000 Subject: [PATCH] fix(nuxt3): use resolved options for `useCookie` (#2260) --- packages/nuxt3/src/app/composables/cookie.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) })