From 43c7c9ad079ce70dcf91189c37246206d97fc142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 11 Jun 2020 10:29:11 +0200 Subject: [PATCH] Fixing null initialization --- front/src/Phaser/Game/GameManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Game/GameManager.ts b/front/src/Phaser/Game/GameManager.ts index 82c0812b..07bb204b 100644 --- a/front/src/Phaser/Game/GameManager.ts +++ b/front/src/Phaser/Game/GameManager.ts @@ -35,7 +35,7 @@ export interface MapObject { export class GameManager { //status: number; private ConnectionInstance: Connection; - private currentGameScene: GameScene|null; + private currentGameScene: GameScene|null = null; private playerName: string; SimplePeer : SimplePeer; private characterUserSelected: string; @@ -168,7 +168,7 @@ export class GameManager { private oldMapUrlFile : string; private oldInstance : string; private scenePlugin: ScenePlugin; - private reconnectScene: Scene|null; + private reconnectScene: Scene|null = null; switchToDisconnectedScene(): void { if (this.currentGameScene === null) { return;