Skip to content

Commit a7652d7

Browse files
committed
better fix
1 parent a486309 commit a7652d7

2 files changed

Lines changed: 1 addition & 9 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 & 8 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 };
@@ -356,11 +354,6 @@ export function restart(options = {} as RestartOptions): void {
356354
TestInitFailed.hide();
357355
TestState.setTestInitSuccess(true);
358356

359-
if (options.skipInit) {
360-
TestState.setTestRestarting(false);
361-
return;
362-
}
363-
364357
const initResult = await init();
365358

366359
if (!initResult) {
@@ -431,7 +424,7 @@ async function init(): Promise<boolean> {
431424
return await init();
432425
}
433426

434-
if (getActivePage() === "test") {
427+
if (getActivePage() === "test" && !PageTransition.get()) {
435428
await Funbox.activate();
436429
}
437430

0 commit comments

Comments
 (0)