diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js index 0fd0a5477..f522a598c 100644 --- a/src/js/commandline-lists.js +++ b/src/js/commandline-lists.js @@ -126,8 +126,9 @@ let commandsFunbox = { id: "changeFunboxNone", display: "none", exec: () => { - Funbox.setFunbox("none", null); - TestLogic.restart(); + if (Funbox.setFunbox("none", null)) { + TestLogic.restart(); + } }, }, ], @@ -139,8 +140,9 @@ Misc.getFunboxList().then((funboxes) => { id: "changeFunbox" + funbox.name, display: funbox.name.replace(/_/g, " "), exec: () => { - Funbox.setFunbox(funbox.name, funbox.type); - TestLogic.restart(); + if (Funbox.setFunbox(funbox.name, funbox.type)) { + TestLogic.restart(); + } }, }); }); diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index e5dd6f327..821e592ac 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -624,9 +624,9 @@ export function restart(withSameWordset = false, nosave = false, event) { // incompleteTestSeconds += ; TestStats.incrementIncompleteSeconds(testSeconds - afkseconds); TestStats.incrementRestartCount(); - // restartCount++; } + if (Config.mode == "zen") { $("#words").empty(); }