fix broken what links here widget

This commit is contained in:
zadam
2020-09-05 22:45:26 +02:00
parent 6d095b7250
commit 874972a3d3
4 changed files with 15 additions and 3 deletions

View File

@@ -38,7 +38,8 @@ function getNotesAndBranchesAndAttributes(noteIds) {
position,
isInheritable
FROM attributes
WHERE isDeleted = 0 AND noteId IN (???)`, noteIds);
WHERE isDeleted = 0
AND (noteId IN (???) OR (type = 'relation' AND value IN (???)))`, noteIds);
// sorting in memory is faster
attributes.sort((a, b) => a.position - b.position < 0 ? -1 : 1);