From 588c48dbce2a692e87a54c22f35b740abd1d3a6b Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Thu, 12 Sep 2024 23:22:13 -0400 Subject: [PATCH] handle undefined introVisuals properly --- src/phases/encounter-phase.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 3ef9625ddee..4d3388949f1 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -366,8 +366,8 @@ export class EncounterPhase extends BattlePhase { } } else if (this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER && this.scene.currentBattle.mysteryEncounter) { const encounter = this.scene.currentBattle.mysteryEncounter; - const introVisuals = encounter.introVisuals!; - introVisuals.playAnim(); + const introVisuals = encounter.introVisuals; + introVisuals?.playAnim(); if (encounter.onVisualsStart) { encounter.onVisualsStart(this.scene);