From 207ab8caef99bcdac5a60e8c355f0cd340abd8ad Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 7 Feb 2024 16:26:03 +0800 Subject: [PATCH] fix: filenames --- .../client/src/data-source/collection-field/CollectionField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/data-source/collection-field/CollectionField.tsx b/packages/core/client/src/data-source/collection-field/CollectionField.tsx index f2ea20420c..d220e2fb57 100644 --- a/packages/core/client/src/data-source/collection-field/CollectionField.tsx +++ b/packages/core/client/src/data-source/collection-field/CollectionField.tsx @@ -73,7 +73,7 @@ export const CollectionFieldInternalFieldV2: React.FC = (props: Props) => { const collectionField = getField(fieldSchema.name) || getCollectionJoinField(fieldSchema.name as string); const targetCollection = getCollection(collectionField?.target); let fieldNames = {}; - if (collectionField?.target) { + if (collectionField?.target && targetCollection) { fieldNames = { label: collectionField?.targetKey || targetCollection.getPrimaryKey(), value: collectionField?.targetKey || targetCollection.getPrimaryKey(),