fix(editor): behavior when clicking in blank page and backspacing on last group

This commit is contained in:
austaras
2022-08-05 16:07:21 +08:00
committed by Austaras
parent cb86ea8ae5
commit e12deb302f
4 changed files with 34 additions and 19 deletions

View File

@@ -137,7 +137,7 @@ export const TextView: FC<CreateTextView> = ({
!parentChild.length
) {
await editor.selectionManager.setSelectedNodesIds(
[preParent.id]
[preParent?.id ?? editor.getRootBlockId()]
);
}
}