fixed burst heatmap not working in zen. closes #2327

This commit is contained in:
Miodec 2022-01-20 23:23:31 +01:00
parent dc1536fbd0
commit bc160812a1
2 changed files with 4 additions and 1 deletions

View file

@ -237,6 +237,9 @@ export function calculateBurst() {
let wordLength;
if (Config.mode === "zen") {
wordLength = TestLogic.input.current.length;
if (wordLength == 0) {
wordLength = TestLogic.input.getHistoryLast().length;
}
} else {
wordLength = TestLogic.words.getCurrent().length;
}

View file

@ -907,7 +907,7 @@ export function applyBurstHeatmap() {
if (
TestLogic.input.getHistory(TestLogic.input.getHistory().length - 1)
.length !== TestLogic.words.getCurrent().length
.length !== TestLogic.words.getCurrent()?.length
) {
burstlist = burstlist.splice(0, burstlist.length - 1);
}