mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 02:39:05 +08:00
fix(typing test): expert mode not working
This commit is contained in:
parent
4e46f6bc9f
commit
0715352c5a
1 changed files with 4 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue