mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🐛 Fix npe
This commit is contained in:
parent
21b64d3710
commit
dc95dc3555
1 changed files with 1 additions and 1 deletions
|
|
@ -253,7 +253,7 @@ func GetBlockIndex(id string) (ret int) {
|
|||
}
|
||||
|
||||
rootChild := node
|
||||
for ; nil == rootChild.Parent || ast.NodeDocument != rootChild.Parent.Type; rootChild = rootChild.Parent {
|
||||
for ; nil != rootChild.Parent && ast.NodeDocument != rootChild.Parent.Type; rootChild = rootChild.Parent {
|
||||
}
|
||||
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue