mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-14 09:36:00 +08:00
reordered function to avoid warning
This commit is contained in:
parent
a7e051461b
commit
1f54d78fde
1 changed files with 12 additions and 12 deletions
|
@ -904,18 +904,6 @@ export function addWord() {
|
|||
TestUI.addWord(randomWord);
|
||||
}
|
||||
|
||||
export function fail() {
|
||||
input.pushHistory();
|
||||
corrected.pushHistory();
|
||||
TestStats.pushKeypressesToHistory();
|
||||
TestStats.setLastSecondNotRound();
|
||||
finish(true);
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
let afkseconds = TestStats.calculateAfkSeconds();
|
||||
TestStats.incrementIncompleteSeconds(testSeconds - afkseconds);
|
||||
TestStats.incrementRestartCount();
|
||||
}
|
||||
|
||||
export function finish(difficultyFailed = false) {
|
||||
if (!active) return;
|
||||
if (Config.mode == "zen" && input.current.length != 0) {
|
||||
|
@ -1734,3 +1722,15 @@ export function finish(difficultyFailed = false) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function fail() {
|
||||
input.pushHistory();
|
||||
corrected.pushHistory();
|
||||
TestStats.pushKeypressesToHistory();
|
||||
TestStats.setLastSecondNotRound();
|
||||
finish(true);
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
let afkseconds = TestStats.calculateAfkSeconds();
|
||||
TestStats.incrementIncompleteSeconds(testSeconds - afkseconds);
|
||||
TestStats.incrementRestartCount();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue