From 2df9fc379c79d0a3fd7f35eec1c70a01c8adb65c Mon Sep 17 00:00:00 2001 From: Saint-dev Date: Mon, 5 Apr 2021 14:08:56 -0400 Subject: [PATCH] changed how funbox was called in command-lists --- src/js/commandline-lists.js | 10 ++++++---- src/js/test/test-logic.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) 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(); }