avoid errors on dead backlinks, #3289

This commit is contained in:
zadam 2022-11-14 21:03:14 +01:00
parent 89e319c7a2
commit 4961d9bb89

View File

@ -317,7 +317,7 @@ function findExcerpts(sourceNote, referencedNoteId) {
function getFilteredBacklinks(note) {
return note.getTargetRelations()
// search notes have "ancestor" relations which are not interesting
.filter(note => note.getNote().type !== 'search');
.filter(relation => !!relation.getNote() && relation.getNote().type !== 'search');
}
function getBacklinkCount(req) {