setting the accuracy to 0 if its not a number

This commit is contained in:
Miodec 2021-01-21 00:11:21 +00:00
parent c838283c15
commit 647338cb61

View file

@ -1781,6 +1781,7 @@ function calculateStats() {
(accuracyStats.correct + accuracyStats.incorrect)) *
100
);
if (isNaN(acc)) acc = 0;
return {
wpm: isNaN(wpm) ? 0 : wpm,
wpmRaw: isNaN(wpmraw) ? 0 : wpmraw,