From f8e9385845faed4c2dc7ddba46fbc51a49997edf Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 9 Jul 2024 14:17:32 +0800 Subject: [PATCH] fix: ineffective conditional checks for checkbox fields as linkage rule under m2o association field (#4849) --- packages/core/client/src/schema-component/common/utils/logic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/common/utils/logic.js b/packages/core/client/src/schema-component/common/utils/logic.js index 7dd9b0c6c1..df8bb51fab 100644 --- a/packages/core/client/src/schema-component/common/utils/logic.js +++ b/packages/core/client/src/schema-component/common/utils/logic.js @@ -134,7 +134,7 @@ export function getJsonLogic() { return a.some((element) => b.includes(element)); }, $noneOf: function (a, b) { - if (a.length === 0) { + if (!a || a?.length === 0) { return true; } if (Array.isArray(a) && Array.isArray(b) && a.some((element) => Array.isArray(element))) {