mirror of
https://github.com/modrinth/code.git
synced 2026-09-03 13:36:48 +00:00
@@ -201,7 +201,10 @@ export default defineNuxtPlugin({
|
|||||||
|
|
||||||
locale.value = newLocale
|
locale.value = newLocale
|
||||||
if (persist) {
|
if (persist) {
|
||||||
useCookie('locale', { maxAge: 31536000, path: '/' }).value = newLocale
|
// Awaiting loadLocale above drops the Nuxt context on the server, where useCookie needs it
|
||||||
|
nuxtApp.runWithContext(() => {
|
||||||
|
useCookie('locale', { maxAge: 31536000, path: '/' }).value = newLocale
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user