Handle case when path.get() may be null

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-05-23 20:24:39 +05:30
parent 96959a3c4c
commit 439910f6ca

View file

@ -251,7 +251,7 @@ export class SessionViewModel extends ViewModel {
}
_toggleRoomInformationPanel() {
const roomId = this.navigation.path.get("room").value;
const roomId = this.navigation.path.get("room")?.value;
const room = this._sessionContainer.session.rooms.get(roomId);
const enable = !!this.navigation.path.get("details");
if (!room) {