mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
fixed master mode bug where pressing space on the last word would freeze the website
This commit is contained in:
parent
e27ca6fcd6
commit
5a17c46275
2 changed files with 4 additions and 2 deletions
|
@ -759,6 +759,8 @@ function handleAlpha(event) {
|
|||
}
|
||||
|
||||
if (!thisCharCorrect && Config.difficulty == "master") {
|
||||
TestLogic.input.pushHistory();
|
||||
TestLogic.corrected.pushHistory();
|
||||
TestLogic.fail("difficulty");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2096,8 +2096,8 @@ export async function finish(difficultyFailed = false) {
|
|||
let failReason = "";
|
||||
export function fail(reason) {
|
||||
failReason = reason;
|
||||
input.pushHistory();
|
||||
corrected.pushHistory();
|
||||
// input.pushHistory();
|
||||
// corrected.pushHistory();
|
||||
TestStats.pushKeypressesToHistory();
|
||||
finish(true);
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
|
|
Loading…
Reference in a new issue