mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 18:08:13 +08:00
Filter excludeFromNoteMap from backlinks
This commit is contained in:
parent
e93dd176c0
commit
c85ec957ec
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue