From aefcc5bd32de639221ad93ead8b4ad8a635f6e05 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 22 Jan 2019 17:15:14 +1000 Subject: [PATCH] fix for case when player joins game before zones scene loads --- client/src/scenes/zones.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/scenes/zones.js b/client/src/scenes/zones.js index f8ba8cc4..13596dfc 100644 --- a/client/src/scenes/zones.js +++ b/client/src/scenes/zones.js @@ -121,7 +121,7 @@ class Zones extends Phaser.Scene { } cleanUp() { - this.scene.get('ZoneControls').cleanUp(); + if (this.scene.get('ZoneControls')) this.scene.get('ZoneControls').cleanUp(); this.scene.remove(); } }