From be8962cec29aa23ea56515ec3cc8a8232b940bd6 Mon Sep 17 00:00:00 2001 From: Kaki In <91763754+Kaki-In@users.noreply.github.com> Date: Fri, 22 Jul 2022 16:59:48 +0200 Subject: [PATCH] Fixed priority operations when checking request status --- src/domain/session/room/RoomViewModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/session/room/RoomViewModel.js b/src/domain/session/room/RoomViewModel.js index 5415d6dd..1786741e 100644 --- a/src/domain/session/room/RoomViewModel.js +++ b/src/domain/session/room/RoomViewModel.js @@ -214,9 +214,9 @@ export class RoomViewModel extends ViewModel { const internalId = await this._options.client.session.joinRoom(roomName); this.navigation.push("room", internalId); } catch (exc) { - if (exc.statusCode ?? exc.status === 400) { + if ((exc.statusCode ?? exc.status) === 400) { this._sendError = new Error(`/join : '${roomName}' was not legal room ID or room alias`); - } else if ((exc.statusCode ?? exc.status === 404) || (exc.statusCode ?? exc.status === 502) || (exc.message == "Internal Server Error")) { + } else if ((exc.statusCode ?? exc.status) === 404 || (exc.statusCode ?? exc.status) === 502 || exc.message == "Internal Server Error") { this._sendError = new Error(`/join : room '${roomName}' not found`); } else { this._sendError = new Error("join syntax: /join ");