Skip to content

Commit

Permalink
fix: lazy load i18n files (nuxt-modules#2193)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Jul 3, 2023
1 parent 7c20648 commit 41c910c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export async function loadInitialMessages<Context extends NuxtApp = NuxtApp>(
await Promise.all(fallbackLocales.map(locale => loadLocale(context, locale, setter)))
}
// load initial messages
const locales = lazy ? [...new Set<Locale>().add(defaultLocale).add(initialLocale)] : localeCodes
const locales = lazy ? localeCodes : [...new Set<Locale>().add(defaultLocale).add(initialLocale)]
await Promise.all(locales.map(locale => loadLocale(context, locale, setter)))
}

Expand Down

0 comments on commit 41c910c

Please sign in to comment.