This commit is contained in:
Jannik Streidl
2024-10-10 17:20:50 +02:00
parent 89c77f05a8
commit 741230bcdb
2 changed files with 4 additions and 10 deletions

View File

@@ -49,15 +49,6 @@
});
return acc;
}, []);
$: if (_citations.every((citation) => citation.distances !== undefined)) {
// Sort citations by distance (relevance)
_citations = _citations.sort((a, b) => {
const aMinDistance = Math.min(...(a.distances ?? []));
const bMinDistance = Math.min(...(b.distances ?? []));
return aMinDistance - bMinDistance;
});
}
</script>
<CitationsModal bind:show={showCitationModal} citation={selectedCitation} />