feat(assist): fixed double sort

This commit is contained in:
Taha Yassine Kraiem 2022-07-15 17:51:47 +02:00 committed by Shekar Siri
parent b541816c5d
commit 92e44a7af4

View file

@ -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();