mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: avoid double decoding cookie
This commit is contained in:
parent
ee1546be25
commit
92a03d6002
@ -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) })
|
||||
|
Loading…
Reference in New Issue
Block a user