mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 13:11:19 +08:00
Fixed Decimal Bug
This commit is contained in:
parent
dd33f693ae
commit
b28fe166e5
2 changed files with 4 additions and 3 deletions
|
|
@ -294,7 +294,6 @@ function handleSpace(event, isEnter) {
|
|||
return;
|
||||
} else if (TestLogic.words.currentIndex == TestLogic.words.length) {
|
||||
//submitted last word that is incorrect
|
||||
TestStats.setLastSecondNotRound();
|
||||
TestLogic.finish();
|
||||
return;
|
||||
}
|
||||
|
|
@ -674,7 +673,6 @@ function handleAlpha(event) {
|
|||
TestLogic.input.pushHistory();
|
||||
|
||||
TestLogic.corrected.pushHistory();
|
||||
TestStats.setLastSecondNotRound();
|
||||
TestLogic.finish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -949,6 +949,10 @@ export function finish(difficultyFailed = false) {
|
|||
Keymap.hide();
|
||||
Funbox.activate("none", null);
|
||||
|
||||
if (Misc.roundTo2(TestStats.calculateTestSeconds()) % 1 != 0) {
|
||||
TestStats.setLastSecondNotRound();
|
||||
}
|
||||
|
||||
if (Config.mode == "zen" || bailout) {
|
||||
TestStats.removeAfkData();
|
||||
}
|
||||
|
|
@ -1783,7 +1787,6 @@ export function fail() {
|
|||
input.pushHistory();
|
||||
corrected.pushHistory();
|
||||
TestStats.pushKeypressesToHistory();
|
||||
TestStats.setLastSecondNotRound();
|
||||
finish(true);
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
let afkseconds = TestStats.calculateAfkSeconds();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue