From e9e57fa19a52aaa3376fe7cc324f42434c0cdddc Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 12 Apr 2025 18:03:27 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14538 --- app/src/protyle/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index 3202559d3..56520e4e2 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -177,7 +177,7 @@ export class Protyle { } else { onTransaction(this.protyle, item, false); // 反链面板移除元素后,文档为空 - if (this.protyle.wysiwyg.element.childElementCount === 0) { + if (this.protyle.wysiwyg.element.childElementCount === 0 && this.protyle.block.parentID) { const newID = Lute.NewNodeID(); const emptyElement = genEmptyElement(false, false, newID); this.protyle.wysiwyg.element.append(emptyElement);