From 947215f96d82708af6cf31019f37f317fc0cee2e Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 29 Jun 2022 22:39:55 +0800 Subject: [PATCH] fix(client): cannot read properties of undefined (reading 'split') --- .../src/collection-manager/hooks/useCollectionManager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts b/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts index cee20f4d4..3b85242c8 100644 --- a/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts +++ b/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts @@ -35,6 +35,9 @@ export const useCollectionManager = () => { }, getCollectionField, getCollectionJoinField(name: string) { + if (!name) { + return; + } const [collectionName, ...fieldNames] = name.split('.'); if (!fieldNames?.length) { return;