Merge pull request #3075 from sigaloid/master

Filter excludeFromNoteMap from backlinks
This commit is contained in:
zadam 2022-08-20 22:31:37 +02:00 committed by GitHub
commit 9ce0421ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ function getBacklinks(req) {
let backlinksWithExcerptCount = 0; let backlinksWithExcerptCount = 0;
return backlinks.map(backlink => { return backlinks.filter(note => !note.getNote().hasLabel('excludeFromNoteMap')).map(backlink => {
const sourceNote = backlink.note; const sourceNote = backlink.note;
if (sourceNote.type !== 'text' || backlinksWithExcerptCount > 50) { if (sourceNote.type !== 'text' || backlinksWithExcerptCount > 50) {

View File

@ -315,7 +315,7 @@ function getBacklinkCount(req) {
} }
else { else {
return { return {
count: note.getTargetRelations().length count: note.getTargetRelations().filter(note => !note.getNote().hasLabel('excludeFromNoteMap')).length
}; };
} }
} }