mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
link map WIP
This commit is contained in:
@@ -14,7 +14,7 @@ async function getLinks(noteIds) {
|
||||
WHERE (noteId IN (???) OR value IN (???))
|
||||
AND type = 'relation'
|
||||
AND isDeleted = 0
|
||||
`, noteIds);
|
||||
`, Array.from(noteIds));
|
||||
}
|
||||
|
||||
async function getLinkMap(req) {
|
||||
@@ -27,7 +27,7 @@ async function getLinkMap(req) {
|
||||
const newLinks = await getLinks(noteIds);
|
||||
const newNoteIds = new Set(newLinks.map(l => l.noteId).concat(newLinks.map(l => l.targetNoteId)));
|
||||
|
||||
if (newNoteIds.length === noteIds.length) {
|
||||
if (newNoteIds.size === noteIds.size) {
|
||||
// no new note discovered, no need to search any further
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user