Skip to content

Commit

Permalink
Update formUtil.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaGashtold authored Aug 23, 2024
1 parent a497b67 commit db39577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/formUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export const eachComponentData = (
if (isComponentModelType(component, 'dataObject')) {
// No need to bother processing all the children data if there is no data for this form or the reference value has not been loaded.
const nestedFormValue: any = get(data, component.path);
const noReferenceAttached =nestedFormValue?._id && isEmpty(nestedFormValue.data) && !has(nestedFormValue, 'form');
const noReferenceAttached = nestedFormValue?._id && isEmpty(nestedFormValue.data) && !has(nestedFormValue, 'form');
const shouldProcessNestedFormData = nestedFormValue?._id ? !noReferenceAttached : has(data, component.path);
if (shouldProcessNestedFormData) {
// For nested forms, we need to reset the "data" and "path" objects for all of the children components, and then re-establish the data when it is done.
Expand Down

0 comments on commit db39577

Please sign in to comment.