Skip to content

Commit

Permalink
Fix order on search
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jun 14, 2024
1 parent a57d9cd commit cd85a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/_._index/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export function sort(
items: Array<ArticleItem | BookmarkItem | TutorialItem | GlossaryItem>,
) {
return items.sort((a, b) => {
if (a.score !== b.score) return b.score - a.score;
if (a.score !== b.score) return a.score - b.score;
return b.payload.createdAt - a.payload.createdAt;
});
}

0 comments on commit cd85a87

Please sign in to comment.