Fix crash when updating name before info UI is initialized

This commit is contained in:
Flashfyre committed 2024-01-10 19:02:41 -05:00
1 parent 94b43b9dc5
commit 0741478d24
1 file changed
+2 -1
+2 -1
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;