From 29bf7fa49d6956d1668fa09f1bcfcdb76f890731 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Sun, 9 May 2021 02:40:09 -0300 Subject: [PATCH] Fix connection check --- src/nitro/Nitro.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nitro/Nitro.ts b/src/nitro/Nitro.ts index 4f8fa875..ce740b26 100644 --- a/src/nitro/Nitro.ts +++ b/src/nitro/Nitro.ts @@ -154,13 +154,13 @@ export class Nitro extends Application implements INitro this._roomEngine.init(); } - new GameMessageHandler(this._communication.connection); - if(!this._communication.connection) { throw new Error('No connection found'); } + new GameMessageHandler(this._communication.connection); + this._isReady = true; }