Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(group): delete group when there's no children

austaras56cdcf862264
diff --git a/libs/components/editor-blocks/src/blocks/grid/index.ts b/libs/components/editor-blocks/src/blocks/grid/index.ts
index 808f54f0aa..582014376f 100644
--- a/libs/components/editor-blocks/src/blocks/grid/index.ts
+++ b/libs/components/editor-blocks/src/blocks/grid/index.ts
@@ -36,6 +36,9 @@ export class GridBlock extends BaseView {
}
return block.remove();
}
+ if (block.childrenIds.length === 0) {
+ return block.remove();
+ }
return true;
}
}