nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.75k stars 483 forks source link

fix: `setLocale` throws error updating locale cookie from plugin #2783

Closed BobbieGoede closed 9 months ago

BobbieGoede commented 9 months ago

🔗 Linked issue

❓ Type of change

📚 Description

This should be a more complete fix for https://github.com/nuxt-modules/i18n/issues/2554#issuecomment-1939318875, looks like the main issue was the useCookie usage, which this PR moves out of the function and passes the CookieRef to the utility/internal functions instead.

📝 Checklist