fixed results being added to the wrong bucket of the account histogram chart

This commit is contained in:
Miodec 2023-05-19 13:22:40 +02:00
parent 5ff41ded22
commit 959812af31

View file

@ -523,6 +523,9 @@ function fillContent(): void {
}
const bucket = Math.floor(result.wpm / 10) * 10;
const bucket2 = Math.floor(Math.round(result.wpm) / 10) * 10;
if (bucket !== bucket2) console.log(result.wpm, bucket, bucket2);
if (Object.keys(histogramChartData).includes(String(bucket))) {
histogramChartData[bucket]++;