From 23caea1766e3c63af188ce8ab731eaac3fe35710 Mon Sep 17 00:00:00 2001 From: Adrian T <68144167+torranx@users.noreply.github.com> Date: Thu, 13 Jun 2024 02:39:37 +0800 Subject: [PATCH] [Bug] hotfix type hint (#2146) --- src/phases.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/phases.ts b/src/phases.ts index 53ccd110f9c..9e6653a8006 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3125,7 +3125,9 @@ export class ShowAbilityPhase extends PokemonPhase { const pokemon = this.getPokemon(); this.scene.abilityBar.showAbility(pokemon, this.passive); - pokemon.battleData.abilityRevealed = true; + if (pokemon.battleData) { + pokemon.battleData.abilityRevealed = true; + } this.end(); }