mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 05:40:10 +08:00
This commit is contained in:
parent
8682b30fa0
commit
e9e57fa19a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user