You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling window.location.reload() immediately in callback in
nuxtApp.hook('i18n:localeSwitched'), cookie and current language resets to a previous value.
Environment
Darwin
v20.11.1
3.13.2
3.15.0
2.9.7
npm@10.2.4
-
default
@nuxtjs/i18n@8.5.5
,@pinia/nuxt@0.6.0
-
Reproduction
https://stackblitz.com/edit/github-paob67?file=plugins%2Finit.ts but for some reason stackblitz not setting cookie when using setLocale from useI18n;
Describe the bug
When calling window.location.reload() immediately in callback in
nuxtApp.hook('i18n:localeSwitched'), cookie and current language resets to a previous value.
But if you wrap reload in setTimeout it works as expected
Additional context
If this hook is async we should probably wait for it and then execute our callback?
Logs
No response
The text was updated successfully, but these errors were encountered: