Skip to content

Commit

Permalink
fix: avoid double decoding cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 22, 2021
1 parent ee1546b commit 92a03d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt3/src/app/composables/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function useCookie <T=string> (name: string, _opts: CookieOptions<T>): Co
const opts = { ...CookieDefaults, ..._opts }
const cookies = readRawCookies(opts)

const cookie = ref(opts.decode(cookies[name]))
const cookie = ref(cookies[name])

if (process.client) {
watch(cookie, () => { writeClientCookie(name, cookie.value, opts) })
Expand Down

0 comments on commit 92a03d6

Please sign in to comment.