Fix crash on catch

pull/348/head
Flashfyre 2024-04-30 23:27:22 -04:00
parent 93765d4121
commit 7ad9c67673
1 changed files with 1 additions and 1 deletions

View File

@ -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);