Skip to content

Commit 41c910c

Browse files
authored
fix: lazy load i18n files (#2193)
1 parent 7c20648 commit 41c910c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export async function loadInitialMessages<Context extends NuxtApp = NuxtApp>(
122122
await Promise.all(fallbackLocales.map(locale => loadLocale(context, locale, setter)))
123123
}
124124
// load initial messages
125-
const locales = lazy ? [...new Set<Locale>().add(defaultLocale).add(initialLocale)] : localeCodes
125+
const locales = lazy ? localeCodes : [...new Set<Locale>().add(defaultLocale).add(initialLocale)]
126126
await Promise.all(locales.map(locale => loadLocale(context, locale, setter)))
127127
}
128128

0 commit comments

Comments
 (0)