fix(typing test): expert mode not working

This commit is contained in:
Miodec 2024-06-11 18:10:50 +02:00
parent 4e46f6bc9f
commit 0715352c5a

View file

@ -280,20 +280,16 @@ async function handleSpace(): Promise<void> {
TestInput.incrementKeypressCount();
TestInput.pushKeypressWord(TestWords.words.currentIndex);
Replay.addReplayEvent("submitErrorWord");
if (Config.difficulty === "expert" || Config.difficulty === "master") {
TestLogic.fail("difficulty");
}
}
if (
TestLogic.areAllTestWordsGenerated() &&
TestWords.words.currentIndex === TestWords.words.length
) {
if (
!isWordCorrect &&
(Config.difficulty === "expert" || Config.difficulty === "master")
) {
TestLogic.fail("difficulty");
} else {
void TestLogic.finish();
}
void TestLogic.finish();
return;
}