fix: error when creating comment block without comment collection (#6309)

This commit is contained in:
Katherine 2025-02-27 09:08:07 +08:00 committed by GitHub
parent 605eea4399
commit bbb3bc9a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,7 +398,7 @@ export const DataBlockInitializer: FC<DataBlockInitializerProps> = (props) => {
];
}, [searchedChildren, hideChildrenIfSingleCollection, name, compile, title, icon, onClick, props]);
if (childItems.length > 1 || (childItems.length === 1 && childItems[0].children?.length > 0)) {
if (childItems.length > 1 || (childItems.length === 1 && childItems[0].children)) {
return (
<SchemaInitializerMenu
onOpenChange={(keys) => {