From 04933acbfbff32767389f5844d7c3f3be356af32 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 3 Jun 2021 23:14:17 +0530 Subject: [PATCH] Add missing checks Signed-off-by: RMidhunSuresh --- src/domain/session/leftpanel/LeftPanelViewModel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/domain/session/leftpanel/LeftPanelViewModel.js b/src/domain/session/leftpanel/LeftPanelViewModel.js index 96becf2a..eee53512 100644 --- a/src/domain/session/leftpanel/LeftPanelViewModel.js +++ b/src/domain/session/leftpanel/LeftPanelViewModel.js @@ -99,7 +99,9 @@ export class LeftPanelViewModel extends ViewModel { const room = this.navigation.path.get("room"); if (room) { path = path.with(room); - path = path.with(details); + if (details) { + path = path.with(details); + } } this.navigation.applyPath(path); } else { @@ -108,7 +110,9 @@ export class LeftPanelViewModel extends ViewModel { if (room) { path = path.with(this.navigation.segment("rooms", [room.value])); path = path.with(room); - path = path.with(details); + if (details) { + path = path.with(details); + } } else { path = path.with(this.navigation.segment("rooms", [])); path = path.with(this.navigation.segment("empty-grid-tile", 0));