From 8dcce63bac3d937bc2a6bd380ccc84113f90f70c Mon Sep 17 00:00:00 2001 From: Mitsunee <19474909+Mitsunee@users.noreply.github.com> Date: Tue, 24 Sep 2024 00:43:44 +0200 Subject: [PATCH] fix: sorting direction in exp-compare --- src/exp-compare.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exp-compare.ts b/src/exp-compare.ts index ca6141b..72f03f8 100644 --- a/src/exp-compare.ts +++ b/src/exp-compare.ts @@ -106,7 +106,7 @@ async function main() { lang: monster.lang })); - if (isSorted) results.sort((a, b) => a.exp.expPerHp - b.exp.expPerHp); + if (isSorted) results.sort((a, b) => b.exp.expPerHp - a.exp.expPerHp); const bestVal = Math.max(...results.map(res => res.exp.expPerHp)); const table = Object.fromEntries( results.map(result => {