Skip to content

Commit

Permalink
🚑 [#4362] Prevent crash due to translatable defaultValue
Browse files Browse the repository at this point in the history
Textfield and textarea have the multiple: true option, which turns the defaultValue
into an array of strings rather than a single string, and that
doesn't play well with the translations machinery or missing
translation detection.

Open Forms 2.7.0 removes support for translations for this
property, and older versions get a hotfix to prevent the
crash from happening during detection.

Backport-of: #4387
  • Loading branch information
sergei-maertens committed Jun 14, 2024
1 parent b99fe3c commit 9b09ec1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/openforms/js/components/formio_builder/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ const ALWAYS_TRANSLATABLE_PROPERTIES = ['label', 'description', 'placeholder', '
* test the property path against.
*/
const ADDITIONAL_PROPERTIES_BY_COMPONENT_TYPE = {
textfield: ['defaultValue'],
textarea: ['defaultValue'],
content: ['html'],
fieldset: ['legend'],
editgrid: ['groupLabel'],
Expand Down

0 comments on commit 9b09ec1

Please sign in to comment.