Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/17343#issuecomment-4223974591 https://github.com/siyuan-note/siyuan/issues/4658

Daniel9fa3c8a2db76
diff --git a/kernel/api/block_op.go b/kernel/api/block_op.go
index 74c664942b..a0228d1874 100644
--- a/kernel/api/block_op.go
+++ b/kernel/api/block_op.go
@@ -795,7 +795,9 @@ func updateBlock(c *gin.Context) {
// 使用 API `api/block/updateBlock` 更新列表项时渲染错误 https://github.com/siyuan-note/siyuan/issues/4658
tree.Root.AppendChild(tree.Root.FirstChild.FirstChild) // 将列表下的第一个列表项移到文档结尾,移动以后根下面直接挂列表项,渲染器可以正常工作
tree.Root.FirstChild.Unlink() // 删除列表
- tree.Root.FirstChild.Unlink() // 继续删除列表 IAL
+ if nil != tree.Root.FirstChild && ast.NodeKramdownBlockIAL == tree.Root.FirstChild.Type {
+ tree.Root.FirstChild.Unlink() // 继续删除列表 IAL
+ }
}
if nil != tree.Root.FirstChild {