Skip to content

Commit

Permalink
fix: formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Nov 12, 2024
1 parent a48f70d commit 559e946
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/home/sorting/sorting-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,16 @@ export class SortingManager {
const scoreA = parseFloat(a.getAttribute("data-relevance-score") || "0");
const scoreB = parseFloat(b.getAttribute("data-relevance-score") || "0");
return scoreB - scoreA; // Sort in descending order of relevance score
}).forEach((issue) => {
const issueId = issue.children[0].getAttribute("data-issue-id");
if (!issueId) return;
const result = searchResults.get(parseInt(issueId));
if (!result) return;
issue.style.display = result.visible ? "block" : "none";
if (result.score !== undefined) {
})
.forEach((issue) => {
const issueId = issue.children[0].getAttribute("data-issue-id");
if (!issueId) return;
const result = searchResults.get(parseInt(issueId));
if (!result) return;
issue.style.display = result.visible ? "block" : "none";
if (result.score !== undefined) {
issue.setAttribute("data-relevance-score", result.score.toFixed(3));
}
}
});
}
} catch (error) {
Expand Down

0 comments on commit 559e946

Please sign in to comment.