mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix lint
This commit is contained in:
@@ -99,7 +99,7 @@ export const TextView: FC<CreateTextView> = ({
|
|||||||
if (!parentBlock) {
|
if (!parentBlock) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let preParent = await parentBlock.previousSibling();
|
const preParent = await parentBlock.previousSibling();
|
||||||
if (Protocol.Block.Type.group === parentBlock.type) {
|
if (Protocol.Block.Type.group === parentBlock.type) {
|
||||||
const children = await block.children();
|
const children = await block.children();
|
||||||
const preNode = await block.physicallyPerviousSibling();
|
const preNode = await block.physicallyPerviousSibling();
|
||||||
@@ -130,8 +130,12 @@ export const TextView: FC<CreateTextView> = ({
|
|||||||
);
|
);
|
||||||
if (block.blockProvider.isEmpty()) {
|
if (block.blockProvider.isEmpty()) {
|
||||||
await block.remove();
|
await block.remove();
|
||||||
let parentChild = await parentBlock.children();
|
const parentChild = await parentBlock.children();
|
||||||
if (!parentChild.length) {
|
if (
|
||||||
|
parentBlock.type ===
|
||||||
|
Protocol.Block.Type.group &&
|
||||||
|
!parentChild.length
|
||||||
|
) {
|
||||||
await editor.selectionManager.setSelectedNodesIds(
|
await editor.selectionManager.setSelectedNodesIds(
|
||||||
[preParent.id]
|
[preParent.id]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user