From 6be07994cc5c16d2a9ae416bce219cded27769e0 Mon Sep 17 00:00:00 2001 From: Maroxy Date: Sun, 20 Feb 2022 11:13:18 +0100 Subject: [PATCH] Change handling of Integrity button in State --- src/ts/launcher/State.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/ts/launcher/State.ts b/src/ts/launcher/State.ts index 180ced7..0f415eb 100644 --- a/src/ts/launcher/State.ts +++ b/src/ts/launcher/State.ts @@ -103,20 +103,14 @@ export default class State this.integrityButton.style['display'] = 'none'; this.settingsButton.style['display'] = 'none'; - // We must specify this files here directly - // because otherwise Vite will not bundle 'em - const integrityModule = import('./states/CheckIntegrity'); - - (this._state === 'game-launch-available' ? integrityModule : null!) - .then((module) => { - module.default(this.launcher).then(() => { - this.update().then(() => { - this.launchButton.style['display'] = 'block'; - this.integrityButton.style['display'] = 'block'; - this.settingsButton.style['display'] = 'block'; - }); + import('./states/CheckIntegrity').then((module) => { + module.default(this.launcher).then(() => { + this.update().then(() => { + this.launchButton.style['display'] = 'block'; + this.settingsButton.style['display'] = 'block'; }); }); + }); }; this.update().then(async () => {