From 0741478d24036d0928efb6626682f730abf94d88 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 10 Jan 2024 19:02:41 -0500 Subject: [PATCH] Fix crash when updating name before info UI is initialized --- src/pokemon.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pokemon.ts b/src/pokemon.ts index 074cf5fd535..cfa0efdb466 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -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;