Add checks to initial title data load to prevent softlocks

This commit is contained in:
Flashfyre 2024-03-21 20:45:15 -04:00
parent 69f9692bcd
commit 7f01d3f57b

View File

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