fix(result page): last word in words mode missing input history

This commit is contained in:
Miodec 2024-10-21 12:39:28 +02:00
parent 5d83198ee2
commit ab729e61f1

View file

@ -286,6 +286,8 @@ async function handleSpace(): Promise<void> {
}
}
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<void> {
return;
}
TestInput.corrected.pushHistory();
if (Config.keymapMode === "react") {
void KeymapEvent.flash(" ", true);
}