fixed master mode bug where pressing space on the last word would freeze the website

This commit is contained in:
Jack 2021-08-29 14:51:07 +01:00
parent e27ca6fcd6
commit 5a17c46275
2 changed files with 4 additions and 2 deletions

View file

@ -759,6 +759,8 @@ function handleAlpha(event) {
}
if (!thisCharCorrect && Config.difficulty == "master") {
TestLogic.input.pushHistory();
TestLogic.corrected.pushHistory();
TestLogic.fail("difficulty");
return;
}

View file

@ -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());