Skip to content

Commit

Permalink
🎨 Apply fallback for missing form values
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Dec 3, 2024
1 parent 953d574 commit f17486d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openforms/js/components/admin/forms/VariableMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ const VariableMapping = ({
onClick={() => {
// TODO update
const initial = {[variableName]: '', [propertyName]: ''};
const mapping = get(values, name);
arrayHelpers.insert(mapping ? mapping.length : 0, initial);
const mapping = get(values, name) || [];
arrayHelpers.insert(mapping.length, initial);
}}
>
<FormattedMessage description="Add variable button" defaultMessage="Add variable" />
Expand Down

0 comments on commit f17486d

Please sign in to comment.