Order weapons by XP if same count in X Trends

Closes #489
This commit is contained in:
Kalle (Sendou) 2021-05-09 20:48:05 +03:00
parent ff248d6270
commit 5d04711ed8

View File

@ -76,7 +76,11 @@ const getXTrends = async (): Promise<XTrends> => {
: ("UP" as const),
};
})
.sort((a, b) => b.count - a.count);
.sort((a, b) => {
if (a.count !== b.count) return b.count - a.count;
return b.averageXp - a.averageXp;
});
return acc;
},