Skip to content

Commit

Permalink
do not check if actions settings key is in elementSettings (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmyb authored Nov 6, 2024
1 parent 7899682 commit 889299a
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ export default function saveSettings(state: IFormBuilderState, action: IFormBuil

const newSettings: IKeyValue<unknown> = {...elementToUpdate.settings};
Object.keys(action.settings).forEach(key => {
if (key in newSettings) {
const setting = newSettings[key];
newSettings[key] =
_isLabelObject(setting) && _isLabelObject(action.settings[key])
? {...setting, ...action.settings[key]}
: action.settings[key];
}
const setting = newSettings[key];
newSettings[key] =
_isLabelObject(setting) && _isLabelObject(action.settings[key])
? {...setting, ...action.settings[key]}
: action.settings[key];
});

const newElement: IFormElement = {
Expand Down

0 comments on commit 889299a

Please sign in to comment.