mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-02 21:44:06 +08:00
potentially fixed the 'result data does not make sense' error
This commit is contained in:
parent
85ee735d22
commit
d239074600
2 changed files with 14 additions and 0 deletions
|
|
@ -2681,6 +2681,7 @@ function startTest() {
|
|||
}
|
||||
testActive = true;
|
||||
TestStats.setStart(performance.now());
|
||||
TestStats.resetKeypressTimings();
|
||||
restartTimer();
|
||||
showTimer();
|
||||
$("#liveWpm").text("0");
|
||||
|
|
|
|||
|
|
@ -180,6 +180,19 @@ export function setKeypressSpacing(val) {
|
|||
keypressTimings.spacing.current = val;
|
||||
}
|
||||
|
||||
export function resetKeypressTimings() {
|
||||
keypressTimings = {
|
||||
spacing: {
|
||||
current: -1,
|
||||
array: [],
|
||||
},
|
||||
duration: {
|
||||
current: -1,
|
||||
array: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function pushMissedWord(word) {
|
||||
if (!Object.keys(missedWords).includes(word)) {
|
||||
missedWords[word] = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue