Skip to content

Commit

Permalink
Story/fix fvm translations (#1311)
Browse files Browse the repository at this point in the history
* story/fix-fvm-updating fix form view model not updating

* story/fix-fvm-translations fix translations
  • Loading branch information
floris-thijssen-ritense authored Dec 27, 2024
1 parent 23ca8ac commit 381caca
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ export class FormViewModelComponent implements OnInit {
const defaultOptions = {
...options,
language,
...(formioTranslations === 'object' && {
i18n: {
[language]: this.stateService.flattenTranslationsObject(formioTranslations),
},
}),
...(typeof formioTranslations === 'object'
? {
language,
i18n: {
[language]: this.stateService.flattenTranslationsObject(formioTranslations),
},
}
: {}),
};

return deepmerge(defaultOptions, overrideOptions);
Expand Down

0 comments on commit 381caca

Please sign in to comment.