mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-05 04:56:48 +08:00
fixed wpm validation not working. closes #2029
This commit is contained in:
parent
225973e9ac
commit
87b76246dc
1 changed files with 2 additions and 1 deletions
|
@ -26,8 +26,9 @@ function validateResult(result) {
|
|||
);
|
||||
return false;
|
||||
}
|
||||
let wpm = roundTo2((result.correctChars * (60 / result.testDuration)) / 5);
|
||||
let wpm = roundTo2((result.charStats[0] * (60 / result.testDuration)) / 5);
|
||||
if (
|
||||
isNaN(wpm) ||
|
||||
wpm < result.wpm - result.wpm * 0.01 ||
|
||||
wpm > result.wpm + result.wpm * 0.01
|
||||
) {
|
||||
|
|
Loading…
Add table
Reference in a new issue