🐛 Fix NPE
This commit is contained in:
parent
f708e99a74
commit
0d1c62a4e4
1 changed files with 6 additions and 2 deletions
|
@ -96,7 +96,9 @@ func GetBackmentionDoc(defID, refTreeID, keyword string, containChildren bool) (
|
|||
trees := filesys.LoadTrees(mentionBlockIDs)
|
||||
for id, tree := range trees {
|
||||
backlink := buildBacklink(id, tree, mentionKeywords, luteEngine)
|
||||
ret = append(ret, backlink)
|
||||
if nil != backlink {
|
||||
ret = append(ret, backlink)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -133,7 +135,9 @@ func GetBacklinkDoc(defID, refTreeID, keyword string, containChildren bool) (ret
|
|||
keywords = append(keywords, keyword)
|
||||
}
|
||||
backlink := buildBacklink(linkRef.ID, refTree, keywords, luteEngine)
|
||||
ret = append(ret, backlink)
|
||||
if nil != backlink {
|
||||
ret = append(ret, backlink)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue