mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
impr(pace caret): only update pace caret on repeated tests if wpm was higher (toma-demagn) (#4798)
* Update pace-caret.ts Changed the logic for lastTestWpm when repeating a test * Update pace-caret.ts Prettier reformat of file
This commit is contained in:
parent
572dcd54d9
commit
fbe835b0a7
|
@ -23,7 +23,12 @@ export let settings: Settings | null = null;
|
|||
let lastTestWpm = 0;
|
||||
|
||||
export function setLastTestWpm(wpm: number): void {
|
||||
lastTestWpm = wpm;
|
||||
if (
|
||||
!TestState.isPaceRepeat ||
|
||||
(TestState.isPaceRepeat && wpm > lastTestWpm)
|
||||
) {
|
||||
lastTestWpm = wpm;
|
||||
}
|
||||
}
|
||||
|
||||
function resetCaretPosition(): void {
|
||||
|
|
Loading…
Reference in a new issue