Fixed Upgrades not sorting on PP #609

This commit is contained in:
Daniël van Noord
2021-02-24 17:58:44 +01:00
parent 57fb8430a0
commit 3ce7822854
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -791,7 +791,7 @@ CM.Disp.UpdateUpgrades = function () {
} }
if (CM.Options.SortUpgrades) { if (CM.Options.SortUpgrades) {
arr.sort((a, b) => CM.Disp.colors.indexOf(a.color) - CM.Disp.colors.indexOf(b.color)); arr.sort(function (a, b) { return (CM.Disp.colors.indexOf(a.color) > CM.Disp.colors.indexOf(b.color) ? 1 : (CM.Disp.colors.indexOf(a.color) < CM.Disp.colors.indexOf(b.color) ? -1 : (a.pp < b.pp) ? -1 : 0)); });
} else { } else {
arr.sort((a, b) => a.price - b.price); arr.sort((a, b) => a.price - b.price);
} }