diff --git a/src/routes/api/note_map.js b/src/routes/api/note_map.js index be07f3fe4..45b438d89 100644 --- a/src/routes/api/note_map.js +++ b/src/routes/api/note_map.js @@ -299,7 +299,7 @@ function getBacklinks(req) { let backlinksWithExcerptCount = 0; - return backlinks.map(backlink => { + return backlinks.filter(note => !note.getNote().hasLabel('excludeFromNoteMap')).map(backlink => { const sourceNote = backlink.note; if (sourceNote.type !== 'text' || backlinksWithExcerptCount > 50) { diff --git a/src/routes/api/notes.js b/src/routes/api/notes.js index bb4935303..d21addaad 100644 --- a/src/routes/api/notes.js +++ b/src/routes/api/notes.js @@ -315,7 +315,7 @@ function getBacklinkCount(req) { } else { return { - count: note.getTargetRelations().length + count: note.getTargetRelations().filter(note => !note.getNote().hasLabel('excludeFromNoteMap')).length }; } }