mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): correctly update object cookies in useCookie
(#22474)
This commit is contained in:
parent
692ce5f010
commit
a4e58bc352
@ -53,8 +53,8 @@ export function useCookie<T = string | null | undefined> (name: string, _opts?:
|
||||
}
|
||||
|
||||
if (opts.watch) {
|
||||
watch(cookie, (newVal, oldVal) => {
|
||||
if (watchPaused || isEqual(newVal, oldVal)) { return }
|
||||
watch(cookie, () => {
|
||||
if (watchPaused) { return }
|
||||
callback()
|
||||
},
|
||||
{ deep: opts.watch !== 'shallow' })
|
||||
|
Loading…
Reference in New Issue
Block a user