From 69fac1120446ac554d4b94bb2f1923b0bdbf527f Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 1 Apr 2025 11:38:15 +0800 Subject: [PATCH] fix: oneToMa ny e2e test (#6601) --- .../antd/association-field/AssociationSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx index 7858174d37..ed9969a523 100644 --- a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx @@ -33,7 +33,7 @@ import { RemoteSelect, RemoteSelectProps } from '../remote-select'; import useServiceOptions, { useAssociationFieldContext } from './hooks'; const removeIfKeyEmpty = (obj, filterTargetKey) => { - if (!obj || typeof obj !== 'object' || !filterTargetKey) return obj; + if (!obj || typeof obj !== 'object' || !filterTargetKey || Array.isArray(obj)) return obj; return !obj[filterTargetKey] ? null : obj; };