mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 14:15:29 +01:00
🐛 The updateBlock API encountered a null pointer error https://github.com/siyuan-note/siyuan/issues/16705
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
89dc302694
commit
bc6b382bd1
1 changed files with 2 additions and 2 deletions
|
|
@ -706,8 +706,8 @@ func updateBlock(c *gin.Context) {
|
|||
if nil != tree.Root.FirstChild {
|
||||
tree.Root.FirstChild.SetIALAttr("id", id)
|
||||
} else {
|
||||
logging.LogWarnf("tree root has no child node when updating block [id=%s]", id)
|
||||
return
|
||||
logging.LogWarnf("tree root has no child node, append empty paragraph node")
|
||||
tree.Root.AppendChild(treenode.NewParagraph(id))
|
||||
}
|
||||
|
||||
data = luteEngine.Tree2BlockDOM(tree, luteEngine.RenderOptions, luteEngine.ParseOptions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue