mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 21:09:18 +08:00
checking if test is active before updating style
catching errors and defaulting to 1
This commit is contained in:
parent
f92bad64be
commit
ad3fe3b3e6
1 changed files with 2 additions and 1 deletions
|
@ -86,6 +86,7 @@ export function restart() {
|
|||
}
|
||||
|
||||
export function updateStyle() {
|
||||
if (!TestLogic.active) return;
|
||||
hide();
|
||||
update();
|
||||
setTimeout(() => {
|
||||
|
@ -144,7 +145,7 @@ export function update() {
|
|||
}
|
||||
}
|
||||
if (Config.mode === "quote") {
|
||||
outof = TestLogic.randomQuote.textSplit.length;
|
||||
outof = TestLogic?.randomQuote?.textSplit?.length ?? 1;
|
||||
}
|
||||
if (Config.timerStyle === "bar") {
|
||||
let percent = Math.floor(
|
||||
|
|
Loading…
Reference in a new issue