From 442ff6b50df150386fe6becd0e4c3bf670386e40 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 20 Feb 2024 07:12:03 -0500 Subject: [PATCH] Fix crash with egg hatching --- src/ui/egg-hatch-scene-handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 2d58054e9..7e6e72897 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -32,8 +32,8 @@ export default class EggHatchSceneHandler extends UiHandler { processInput(button: Button): boolean { if (button === Button.ACTION || button === Button.CANCEL) { - const phase = this.scene.getCurrentPhase() as EggHatchPhase; - if (phase.trySkip()) + const phase = this.scene.getCurrentPhase(); + if (phase instanceof EggHatchPhase && phase.trySkip()) return true; }