From 7ad9c67673d348651e26f499c7e6dd5d7390953b Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 30 Apr 2024 23:27:22 -0400 Subject: [PATCH] Fix crash on catch --- src/battle-scene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 39eb912ef..8f07256e3 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1438,7 +1438,7 @@ export default class BattleScene extends SceneBase { } else { let pressed = false; if (this.buttonJustReleased(Button.STATS) || (pressed = this.buttonJustPressed(Button.STATS))) { - for (let p of this.getField().filter(p => p)) + for (let p of this.getField().filter(p => p?.isActive(true))) p.toggleStats(pressed); if (pressed) this.setLastProcessedMovementTime(Button.STATS);