changed how funbox was called in command-lists

This commit is contained in:
Saint-dev 2021-04-05 14:08:56 -04:00
parent dde90f829c
commit 2df9fc379c
2 changed files with 7 additions and 5 deletions

View file

@ -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();
}
},
});
});

View file

@ -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();
}