From d208013aa50f43e97c466c4304b52336f3393d1f Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 7 Aug 2020 20:48:36 +0100 Subject: [PATCH] fixed a bug where pretting an incorrect key then removing it and pressing space would cause a console error --- public/js/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 941b36bf9..d7216f27e 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -3406,7 +3406,6 @@ $(document).keydown((event) => { } compareInput(!config.blindMode); } - // currentKeypressCount++; if (config.keymapMode === "react") { flashPressedKeymapKey(event.code, true); } else if (config.keymapMode === "next") { @@ -3569,7 +3568,7 @@ $(document).keydown((event) => { if (cil < wordsList[currentWordIndex].length) { if (cil >= currentCorrected.length) { currentCorrected += "_"; - } else if (!thisCharCorrect) { + } else { currentCorrected = currentCorrected.substring(0, cil) + "_" +