fix ranked scores history

This commit is contained in:
Lee 2023-10-30 16:31:52 +00:00
parent ea3a0d2753
commit 28898fdd56

@ -153,6 +153,7 @@ async function updateAverages() {
rank: 0,
maxCombo: 0,
};
const rankedScores = scores.filter((score) => score.rank);
scores.forEach((score) => {
if (score.acc) {
average.acc += score.acc;
@ -175,8 +176,8 @@ async function updateAverages() {
}
});
average.acc /= scores.length;
average.pp /= scores.length;
average.stars /= scores.length;
average.pp /= rankedScores.length;
average.stars /= rankedScores.length;
average.mistakes.badCuts /= scores.length;
average.mistakes.missed /= scores.length;
average.rank /= scores.length;