From e2ed6be305d65f90390a332500687859658090db Mon Sep 17 00:00:00 2001 From: Rain <958414905@qq.com> Date: Thu, 23 Nov 2023 11:22:25 +0800 Subject: [PATCH] fix: avoid crashing --- .../antd/collection-select/CollectionSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx index 0eaa564ee..968d59a96 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx @@ -17,7 +17,7 @@ function useOptions({ filter, isTableOid }: CollectionSelectProps) { const field: any = useField(); const ctx: any = useContext(FilterContext); const collection = useCollection(); - const targetCollection = isTableOid && (ctx?.field?.collectionName || ctx.collectionName || collection.name); + const targetCollection = isTableOid && (ctx?.field?.collectionName || ctx?.collectionName || collection.name); const inheritCollections = useSelfAndChildrenCollections(targetCollection); const { collections = [] } = useCollectionManager(); const currentCollections = field?.dataSource