Add missing checks

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-03 23:14:17 +05:30
parent a3587a80c6
commit 04933acbfb

View File

@ -99,8 +99,10 @@ export class LeftPanelViewModel extends ViewModel {
const room = this.navigation.path.get("room");
if (room) {
path = path.with(room);
if (details) {
path = path.with(details);
}
}
this.navigation.applyPath(path);
} else {
let path = this.navigation.path.until("session");
@ -108,7 +110,9 @@ export class LeftPanelViewModel extends ViewModel {
if (room) {
path = path.with(this.navigation.segment("rooms", [room.value]));
path = path.with(room);
if (details) {
path = path.with(details);
}
} else {
path = path.with(this.navigation.segment("rooms", []));
path = path.with(this.navigation.segment("empty-grid-tile", 0));