mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +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 opts = { ...CookieDefaults, ..._opts }
|
||||||
const cookies = readRawCookies(opts)
|
const cookies = readRawCookies(opts)
|
||||||
|
|
||||||
const cookie = ref(opts.decode(cookies[name]))
|
const cookie = ref(cookies[name])
|
||||||
|
|
||||||
if (process.client) {
|
if (process.client) {
|
||||||
watch(cookie, () => { writeClientCookie(name, cookie.value, opts) })
|
watch(cookie, () => { writeClientCookie(name, cookie.value, opts) })
|
||||||
|
Loading…
Reference in New Issue
Block a user