Skip to content

Commit

Permalink
Moved the emtpy check for row.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Nov 30, 2024
1 parent f945a77 commit 68cf8c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/formUtil/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,10 @@ export function getComponentLocalData(paths: ComponentPaths, data: any, local?:
}

export function shouldProcessComponent(comp: Component, row: any, value: any): boolean {
if (isEmpty(row)) {
return false;
}
if (getModelType(comp) === 'dataObject') {
if (isEmpty(row)) {
return false;
}
const noReferenceAttached = value?._id ? isEmpty(value.data) && !has(value, 'form') : false;
const shouldBeCleared =
(!comp.hasOwnProperty('clearOnHide') || comp.clearOnHide) &&
Expand Down

0 comments on commit 68cf8c3

Please sign in to comment.