Skip to content

Commit

Permalink
rolled back the corrected change
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Sep 18, 2020
1 parent 102f575 commit 507a8e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4247,8 +4247,6 @@ $(document).keydown((event) => {
return;
}
inputHistory.push(currentInput);
correctedHistory.push(currentCorrected);
currentCorrected = "";
highlightBadWord(currentWordElementIndex, !config.blindMode);
currentInput = "";
currentWordIndex++;
Expand All @@ -4262,6 +4260,8 @@ $(document).keydown((event) => {
config.difficulty == "expert" ||
config.difficulty == "master"
) {
correctedHistory.push(currentCorrected);
currentCorrected = "";
//submitted last word incorrect and failed test
lastSecondNotRound = true;
showResult(true);
Expand All @@ -4278,7 +4278,8 @@ $(document).keydown((event) => {
currentKeypress.count++;
currentKeypress.words.push(currentWordIndex);
}

correctedHistory.push(currentCorrected);
currentCorrected = "";
if (config.keymapMode === "react") {
flashPressedKeymapKey(event.code, true);
} else if (config.keymapMode === "next") {
Expand Down

0 comments on commit 507a8e7

Please sign in to comment.