Fix crash when updating name before info UI is initialized

This commit is contained in:
Flashfyre 2024-01-10 19:02:41 -05:00
parent 94b43b9dc5
commit 0741478d24
1 changed files with 2 additions and 1 deletions

View File

@ -250,7 +250,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return;
}
this.name = getFusedSpeciesName(this.species.getName(this.formIndex), this.fusionSpecies.getName(this.fusionFormIndex));
this.updateInfo(true);
if (this.battleInfo)
this.updateInfo(true);
}
abstract isPlayer(): boolean;