This commit is contained in:
Liang Ding 2023-02-06 08:54:08 +08:00
parent 1e37640749
commit a3444452aa
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -124,9 +124,9 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int) (ret []*Block, ne
// 查询为空时默认的块引排序规则按最近使用优先 https://github.com/siyuan-note/siyuan/issues/3218
refs := sql.QueryRefsRecent()
for _, ref := range refs {
tree := cachedTrees[ref.RootID]
tree := cachedTrees[ref.DefBlockRootID]
if nil == tree {
tree, _ = loadTreeByBlockID(ref.RootID)
tree, _ = loadTreeByBlockID(ref.DefBlockRootID)
}
if nil == tree {
continue