Skip to content

Commit

Permalink
avoid errors on dead backlinks, #3289
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Nov 14, 2022
1 parent 89e319c commit 4961d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/api/note_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4961d9b

Please sign in to comment.