mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
made sure consistency cannot be nan
This commit is contained in:
parent
01dfd54d63
commit
df029cc215
|
@ -1375,6 +1375,10 @@ function showResult(difficultyFailed = false) {
|
|||
|
||||
let consistency = roundTo2(kogasa(stddev / avg));
|
||||
|
||||
if (isNaN(consistency)) {
|
||||
consistency = 0;
|
||||
}
|
||||
|
||||
$("#result .stats .consistency .bottom").text(Math.round(consistency) + "%");
|
||||
$("#result .stats .consistency .bottom").attr(
|
||||
"aria-label",
|
||||
|
|
Loading…
Reference in a new issue