if input is empty calculating burst from last input

closes #2611
This commit is contained in:
Miodec 2022-03-02 13:39:48 +01:00
parent acc85ce7b8
commit d098d3a2d8

View file

@ -281,7 +281,7 @@ export function calculateBurst(): number {
const timeToWrite = (performance.now() - TestInput.currentBurstStart) / 1000;
let wordLength;
wordLength = TestInput.input.current.length;
if (Config.mode === "zen" && wordLength == 0) {
if (wordLength == 0) {
wordLength = TestInput.input.getHistoryLast().length;
}
const speed = Misc.roundTo2((wordLength * (60 / timeToWrite)) / 5);