From 92e44a7af484d12a33b8a5abb04aa8b8953a0235 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 15 Jul 2022 17:51:47 +0200 Subject: [PATCH] feat(assist): fixed double sort --- utilities/utils/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/utils/helper.js b/utilities/utils/helper.js index 9844fa7d8..7088d2b77 100644 --- a/utilities/utils/helper.js +++ b/utilities/utils/helper.js @@ -160,7 +160,7 @@ const sortPaginate = function (list, filters) { list.sort((a, b) => { const tA = getValue(a, "timestamp"); const tB = getValue(b, "timestamp"); - return tA > tB ? 1 : tA < tB ? -1 : 0; + return tA < tB ? 1 : tA > tB ? -1 : 0; }); if (filters.sort.order) { list.reverse();