We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21d4305 commit 8b42631Copy full SHA for 8b42631
src/templates/utils.js
@@ -20,9 +20,10 @@ export async function loadLanguageAsync (i18n, locale) {
20
try {
21
const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file)
22
const messages = module.default ? module.default : module
23
- i18n.setLocaleMessage(locale, typeof messages === 'function' ? await Promise.resolve(messages()) : messages)
+ const result = typeof messages === 'function' ? await Promise.resolve(messages()) : messages
24
+ i18n.setLocaleMessage(locale, result)
25
i18n.loadedLanguages.push(locale)
- return messages
26
+ return result
27
} catch (error) {
28
console.error(error)
29
}
0 commit comments