From a314ffa2b1051ff3d03d5cfbe6aa113d32edb0a1 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sat, 30 Jul 2022 21:17:02 +0100 Subject: [PATCH] Fix sort not executing if order kept the same. --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index a92940f..68d723b 100644 --- a/index.js +++ b/index.js @@ -204,12 +204,12 @@ function EntrySort(o, s) { chg = true SortValue = s } - if (ts === "desc" || ts === "descending") { - ts = -1 - } else { - ts = 1 - } - if (OrderValue !== o) { + if (chg || OrderValue !== o) { + if (ts === "desc" || ts === "descending") { + ts = -1 + } else { + ts = 1 + } var to = o.toString().toLowerCase() if (to === "start") { if (ts < 0) {