fix: role permission add new scope display blank (#1592)

This commit is contained in:
katherinehhh 2023-03-23 22:52:41 +08:00 committed by GitHub
parent c43930fa7c
commit ef3a2c52d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,8 @@ export const FormBlockProvider = (props) => {
detailFlag = __collection === collection; detailFlag = __collection === collection;
} }
} }
const createFlag = (currentCollection.name === collection && !isEmptyRecord) || !currentCollection.name; const createFlag =
(currentCollection.name === (collection?.name || collection) && !isEmptyRecord) || !currentCollection.name;
return ( return (
(detailFlag || createFlag) && ( (detailFlag || createFlag) && (
<BlockProvider {...props} block={'form'}> <BlockProvider {...props} block={'form'}>