Add checks to initial title data load to prevent softlocks

pull/16/head
Flashfyre 2024-03-21 20:45:15 -04:00
parent 69f9692bcd
commit 7f01d3f57b
1 changed files with 5 additions and 2 deletions

View File

@ -151,15 +151,18 @@ export class TitlePhase extends Phase {
this.scene.arenaBg.setTexture(bgTexture); this.scene.arenaBg.setTexture(bgTexture);
} }
this.showOptions(); this.showOptions();
}).catch(err => {
console.error(err);
this.showOptions();
}); });
} }
showOptions(): void { showOptions(): void {
const options: OptionSelectItem[] = []; const options: OptionSelectItem[] = [];
if (this.lastSessionData) { if (loggedInUser.lastSessionSlot > -1) {
options.push({ options.push({
label: 'Continue', label: 'Continue',
handler: () => this.loadSaveSlot(-1) handler: () => this.loadSaveSlot(this.lastSessionData ? -1 : loggedInUser.lastSessionSlot)
}); });
} }
options.push({ options.push({