Incement accuracy even for trailingComposeChars (#2062)

Co-authored-by: Aditya Pudipeddi <aditya.pudipeddi@postman.com>
This commit is contained in:
pooooooooods 2021-11-08 03:58:36 +05:30 committed by GitHub
parent 462d70a03e
commit 4ba3324240
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -398,6 +398,9 @@ function handleChar(char, charIndex) {
char +
TestLogic.input.current.substring(charIndex + 1);
MonkeyPower.addPower(thisCharCorrect);
TestStats.incrementAccuracy(thisCharCorrect);
if (!thisCharCorrect && Misc.trailingComposeChars.test(resultingWord)) {
TestLogic.input.current = resultingWord;
TestUI.updateWordElement();
@ -405,9 +408,6 @@ function handleChar(char, charIndex) {
return;
}
MonkeyPower.addPower(thisCharCorrect);
TestStats.incrementAccuracy(thisCharCorrect);
if (!thisCharCorrect) {
TestStats.incrementKeypressErrors();
TestStats.pushMissedWord(TestLogic.words.getCurrent());