fixed bug where last incorrect words would could towards correct chars

This commit is contained in:
Jack 2020-10-15 17:38:38 +01:00
parent b1a355c2ee
commit 58b91ddd12

View file

@ -1537,7 +1537,7 @@ function countChars() {
incorrectChars += toAdd.incorrect;
if (i === inputHistory.length - 1 && config.mode == "time") {
//last word - check if it was all correct - add to correct word chars
correctWordChars += toAdd.correct;
if(toAdd.incorrect === 0) correctWordChars += toAdd.correct;
} else {
missedChars += toAdd.missed;
}