From e087be887b9a0a2a00df81ecb687f734926e6cb2 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 24 Apr 2023 22:56:37 +0800 Subject: [PATCH] fix(collection-manager): filter null --- .../collection-manager/Configuration/CollectionFields.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx b/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx index 4711f9132..ec255a6a9 100644 --- a/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx +++ b/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx @@ -359,13 +359,16 @@ export const CollectionFields = (props) => { dataSource.push( ...inherits.map((key) => { const collection = getCollection(key); + if (!collection) { + return; + } return { key, title: `${t('Inherited fields')} - ` + compile(collection?.title), inherit: true, fields: collection?.fields || [], }; - }), + }).filter(Boolean), ); const resourceActionProps = {