From 17e71a1b8affcac6def2fb180b8b53064c5384f5 Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Thu, 20 Mar 2025 12:26:49 -0700 Subject: [PATCH] [Bug] Fix Poison Heal Crash on beta (#5544) Fix !== null uses --- src/data/ability.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index ab78d1dd06c..d9e29c5506c 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3860,7 +3860,7 @@ export class PostTurnStatusHealAbAttr extends PostTurnAbAttr { } override canApplyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { - return (pokemon.status !== null) && this.effects.includes(pokemon.status.effect) && !pokemon.isFullHp(); + return !Utils.isNullOrUndefined(pokemon.status) && this.effects.includes(pokemon.status.effect) && !pokemon.isFullHp(); } /** @@ -4103,7 +4103,7 @@ export class FetchBallAbAttr extends PostTurnAbAttr { } override canApplyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean { - return !simulated && globalScene.currentBattle.lastUsedPokeball !== null && !!pokemon.isPlayer; + return !simulated && !Utils.isNullOrUndefined(globalScene.currentBattle.lastUsedPokeball) && !!pokemon.isPlayer; } /**