From 3904aa7c111eaa522cc7072a268a579aa115906e Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 5 Mar 2023 11:59:08 +0800 Subject: [PATCH] fix: add new blocks --- .../core/client/src/block-provider/FormBlockProvider.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/block-provider/FormBlockProvider.tsx b/packages/core/client/src/block-provider/FormBlockProvider.tsx index fccf9aba4..13faa2926 100644 --- a/packages/core/client/src/block-provider/FormBlockProvider.tsx +++ b/packages/core/client/src/block-provider/FormBlockProvider.tsx @@ -55,9 +55,12 @@ export const FormBlockProvider = (props) => { const { __collection } = record; const currentCollection = useCollection(); const { designable } = useDesignable(); - let detailFlag = true; - if (!designable && __collection) { - detailFlag = __collection === collection; + let detailFlag = false; + if (Object.keys(record).length > 0) { + detailFlag = true; + if (!designable && __collection) { + detailFlag = __collection === collection; + } } const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name; return (