Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: 标题转换文档后编辑原文档触发状态异常 Fix https://github.com/siyuan-note/siyuan/issues/5576

Liang Dinge394c36159f9
diff --git a/kernel/model/listitem.go b/kernel/model/listitem.go
index 8b1c4b7981..c94c6e8d72 100644
--- a/kernel/model/listitem.go
+++ b/kernel/model/listitem.go
@@ -95,7 +95,9 @@ func ListItem2Doc(srcListItemID, targetBoxID, targetPath string) (srcRootBlockID
srcLiParent.Unlink()
}
srcTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
-
+ if nil == srcTree.Root.FirstChild {
+ srcTree.Root.AppendChild(protyle.NewParagraph())
+ }
if err = indexWriteJSONQueue(srcTree); nil != err {
return "", "", err
}