Skip to content

Commit

Permalink
fix issue when declining update and make update mandatory when no sta…
Browse files Browse the repository at this point in the history
…tic files exist
  • Loading branch information
Himyu committed Sep 26, 2024
1 parent 213e5e8 commit 74c69b9
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions StaticData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,15 @@ export default class StaticData {
this.version = this.config.gameVersion
}

if (
!this.config['last-downloaded-version'] ||
if (!this.config['last-downloaded-version']) {
try {
await this.getAdditionalFiles()
await this.getDDragon()
} catch (error) {
this._errorReadyCheck()
return
}
} else if (
this.config['last-downloaded-version'] !== this.version
) {
const continueUpdate = await this.ctx.LPTE.prompt({
Expand All @@ -56,14 +63,14 @@ export default class StaticData {
this._finishedDragonTail = true

if (this.readyHandler) this.readyHandler()
}

try {
await this.getAdditionalFiles()
await this.getDDragon()
} catch (error) {
this._errorReadyCheck()
return
} else {
try {
await this.getAdditionalFiles()
await this.getDDragon()
} catch (error) {
this._errorReadyCheck()
return
}
}
} else {
this._finishedAdditionalFileDownloading = true
Expand Down

0 comments on commit 74c69b9

Please sign in to comment.