Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Fix types issue
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieujabbour committed Aug 5, 2021
1 parent 202f359 commit b72c056
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/src/scripts/vue/components/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const builtInComponents: Components = {
helper: field.message,
icon: field.options.icon,
options: field.options.options.map((option: FormValue) => ((option.label !== undefined)
? ({ ...option, label: field.i18n(option.label, field.options.formValues) })
? ({ ...option, label: (field.i18n as FormValue)(option.label, field.options.formValues) })
: option)),
multiple: field.options.multiple,
modifiers: `${field.status} ${field.options.modifiers || ''}`,
Expand All @@ -236,7 +236,7 @@ const builtInComponents: Components = {
value: field.value,
helper: field.message,
options: field.options.options.map((option: FormValue) => ((option.label !== undefined)
? ({ ...option, label: field.i18n(option.label, field.options.formValues) })
? ({ ...option, label: (field.i18n as FormValue)(option.label, field.options.formValues) })
: option)),
modifiers: `${field.status} ${field.options.modifiers || ''}`,
},
Expand All @@ -254,7 +254,7 @@ const builtInComponents: Components = {
value: field.value,
helper: field.message,
options: field.options.options.map((option: FormValue) => ((option.label !== undefined)
? ({ ...option, label: field.i18n(option.label, field.options.formValues) })
? ({ ...option, label: (field.i18n as FormValue)(option.label, field.options.formValues) })
: option)),
modifiers: `${field.status} ${field.options.modifiers || ''}`,
},
Expand Down

0 comments on commit b72c056

Please sign in to comment.