Skip to content

Commit

Permalink
fix: key-value style messages broken after merging (intlify#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
chojnicki authored Jan 29, 2024
1 parent ac619a9 commit 6a1fd07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vue-i18n-core/src/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2435,9 +2435,11 @@ export function createComposer(options: any = {}, VueI18nLegacy?: any): any {
__legacy && __legacy.mergeLocaleMessage(locale, message)
}
const _message = { [locale]: message }
for (const key in _message) {
if (hasOwn(_message, key)) {
handleFlatJson(_message[key])
if (flatJson) {
for (const key in _message) {
if (hasOwn(_message, key)) {
handleFlatJson(_message[key])
}
}
}
message = _message[locale]
Expand Down

0 comments on commit 6a1fd07

Please sign in to comment.