Skip to content

Commit

Permalink
fix: lazy load i18n files (#2193)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed 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

1 comment on commit 41c910c

@userquin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit should be in next, you need to revert this another one: #2212

Please sign in to comment.