mirror of https://github.com/nuxt/nuxt.git
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