diff --git a/packages/core/client/src/schema-component/common/utils/uitls.tsx b/packages/core/client/src/schema-component/common/utils/uitls.tsx index 198f98cfa5..e2359e5eef 100644 --- a/packages/core/client/src/schema-component/common/utils/uitls.tsx +++ b/packages/core/client/src/schema-component/common/utils/uitls.tsx @@ -96,7 +96,6 @@ export const conditionAnalyses = async ( ) => { const type = Object.keys(ruleGroup)[0] || '$and'; const conditions = ruleGroup[type]; - let results = conditions.map(async (condition) => { if ('$and' in condition || '$or' in condition) { return await conditionAnalyses({ ruleGroup: condition, variables, localVariables }, jsonLogic); @@ -147,7 +146,10 @@ export const conditionAnalyses = async ( if (type === '$and') { return every(results, (v) => v); } else { - return some(results, (v) => v); + if (results.length) { + return some(results, (v) => v); + } + return true; } };