Skip to content

Commit

Permalink
fix(account page): results being put in the wrong histogram bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Feb 1, 2024
1 parent f57bac8 commit 0920010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/ts/pages/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ async function fillContent(): Promise<void> {
}

const bucketSize = typingSpeedUnit.histogramDataBucketSize;
const bucket = Math.round(
typingSpeedUnit.fromWpm(result.wpm) / bucketSize
const bucket = Math.floor(
Math.round(typingSpeedUnit.fromWpm(result.wpm)) / bucketSize
);

//grow array if needed
Expand Down

0 comments on commit 0920010

Please sign in to comment.