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
switchLocalePath didn't work from a Nuxt plugin or middleware
(from context.app) as it accessed properties on `this` that were not
accessible from there.
Fixed by creating a proxy interface that is consistent for both
Vue instances and Nuxt context so that switchLocalePath can access
same properties from it and get expected results.
Also:
- Updated `differentDomains` tests to not use snapshot testing.
Those actually were wrongly tested due to bug in test utils but
failure wasn't caught in snapshot (it was supposed to have
SEO disabled).
Resolves#480
Version
v5.3.0
Reproduction link
https://codesandbox.io/embed/nuxt-i18n-switchlocalepath-bug-dbi7h
Steps to reproduce
Create a Nuxt plugin and try using
switchLocalePath()
in it.What is expected ?
Function working: returning the locale path for the desired locale.
What is actually happening?
Function crashes with error:
Additional comments?
I'm using nuxt 2.10.0 and nuxt-i18n 6.3.0
The text was updated successfully, but these errors were encountered: