Skip to content

Commit c9ff92c

Browse files
committed
better fix
1 parent a486309 commit c9ff92c

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

frontend/src/ts/pages/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const page = new Page({
1818
afterHide: async (): Promise<void> => {
1919
TestLogic.restart({
2020
noAnim: true,
21-
skipInit: true,
2221
});
2322
void Funbox.clear();
2423
void ModesNotice.update();

frontend/src/ts/test/test-logic.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ type RestartOptions = {
175175
practiseMissed?: boolean;
176176
noAnim?: boolean;
177177
isQuickRestart?: boolean;
178-
skipInit?: boolean;
179178
};
180179

181180
export function restart(options = {} as RestartOptions): void {
@@ -185,7 +184,6 @@ export function restart(options = {} as RestartOptions): void {
185184
noAnim: false,
186185
nosave: false,
187186
isQuickRestart: false,
188-
skipInit: false,
189187
};
190188

191189
options = { ...defaultOptions, ...options };
@@ -355,12 +353,6 @@ export function restart(options = {} as RestartOptions): void {
355353
TestState.setPaceRepeat(repeatWithPace);
356354
TestInitFailed.hide();
357355
TestState.setTestInitSuccess(true);
358-
359-
if (options.skipInit) {
360-
TestState.setTestRestarting(false);
361-
return;
362-
}
363-
364356
const initResult = await init();
365357

366358
if (!initResult) {
@@ -431,7 +423,7 @@ async function init(): Promise<boolean> {
431423
return await init();
432424
}
433425

434-
if (getActivePage() === "test") {
426+
if (getActivePage() === "test" && !PageTransition.get()) {
435427
await Funbox.activate();
436428
}
437429

0 commit comments

Comments
 (0)