destroying on test page

This commit is contained in:
Miodec 2023-02-23 21:04:15 +01:00
parent 90a0d3abca
commit 7998b37b41

View file

@ -155,7 +155,10 @@ function getUnits(): unknown {
export async function reinstate(): boolean {
if (!rampReady) return;
if (ActivePage.get() === "test" && !TestUI.resultVisible) return;
if (ActivePage.get() === "test" && !TestUI.resultVisible) {
ramp.destroyUnits("all");
return;
}
await ramp.destroyUnits("all");
await ramp.addUnits(getUnits());
await ramp.displayUnits();