🐛 Unable to open the doc when the block pointed by the scroll position does not exist Fix https://github.com/siyuan-note/siyuan/issues/9030

This commit is contained in:
Daniel 2023-08-23 10:18:11 +08:00
parent 092b8b16ca
commit c00270cf01
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -516,8 +516,12 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
luteEngine := NewLute()
node := treenode.GetNodeInTree(tree, id)
if nil == node {
err = ErrBlockNotFound
return
// Unable to open the doc when the block pointed by the scroll position does not exist https://github.com/siyuan-note/siyuan/issues/9030
node = treenode.GetNodeInTree(tree, tree.Root.ID)
if nil == node {
err = ErrBlockNotFound
return
}
}
if isBacklink { // 引用计数浮窗请求,需要按照反链逻辑组装 https://github.com/siyuan-note/siyuan/issues/6853