@@ -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 {