mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +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) {
|
if (opts.watch) {
|
||||||
watch(cookie, (newVal, oldVal) => {
|
watch(cookie, () => {
|
||||||
if (watchPaused || isEqual(newVal, oldVal)) { return }
|
if (watchPaused) { return }
|
||||||
callback()
|
callback()
|
||||||
},
|
},
|
||||||
{ deep: opts.watch !== 'shallow' })
|
{ deep: opts.watch !== 'shallow' })
|
||||||
|
Loading…
Reference in New Issue
Block a user