An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Fix NPE
Daniel0d1c62a4e4f4
diff --git a/kernel/model/backlink.go b/kernel/model/backlink.goindex 9d8af1af3a..4612947165 100644--- a/kernel/model/backlink.go+++ b/kernel/model/backlink.go@@ -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) (retkeywords = append(keywords, keyword)}backlink := buildBacklink(linkRef.ID, refTree, keywords, luteEngine)- ret = append(ret, backlink)+ if nil != backlink {+ ret = append(ret, backlink)+ }}return}