From ab729e61f14aaa9d3df68c94bb8546559580f2c2 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 21 Oct 2024 12:39:28 +0200 Subject: [PATCH] fix(result page): last word in words mode missing input history --- frontend/src/ts/controllers/input-controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index e9bd04545..f71cad6ed 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -286,6 +286,8 @@ async function handleSpace(): Promise { } } + TestInput.corrected.pushHistory(); + const isLastWord = TestWords.words.currentIndex === TestWords.words.length; if (TestLogic.areAllTestWordsGenerated() && isLastWord) { void TestLogic.finish(); @@ -308,8 +310,6 @@ async function handleSpace(): Promise { return; } - TestInput.corrected.pushHistory(); - if (Config.keymapMode === "react") { void KeymapEvent.flash(" ", true); }