From cd85a87dda97100dcf8d04bf1e673743180a8040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Xalambr=C3=AD?= Date: Fri, 14 Jun 2024 17:47:39 -0500 Subject: [PATCH] Fix order on search --- app/routes/_._index/queries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/_._index/queries.ts b/app/routes/_._index/queries.ts index aee5649..ba41126 100644 --- a/app/routes/_._index/queries.ts +++ b/app/routes/_._index/queries.ts @@ -278,7 +278,7 @@ export function sort( items: Array, ) { 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; }); }