Fix connection check

This commit is contained in:
MyNameIsBatman 2021-05-09 02:40:09 -03:00
parent 9afbb9dba6
commit 29bf7fa49d

View File

@ -154,13 +154,13 @@ export class Nitro extends Application implements INitro
this._roomEngine.init(); this._roomEngine.init();
} }
new GameMessageHandler(this._communication.connection);
if(!this._communication.connection) if(!this._communication.connection)
{ {
throw new Error('No connection found'); throw new Error('No connection found');
} }
new GameMessageHandler(this._communication.connection);
this._isReady = true; this._isReady = true;
} }