mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 12:04:57 +01:00
Add missing checks
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
a3587a80c6
commit
04933acbfb
@ -99,8 +99,10 @@ export class LeftPanelViewModel extends ViewModel {
|
|||||||
const room = this.navigation.path.get("room");
|
const room = this.navigation.path.get("room");
|
||||||
if (room) {
|
if (room) {
|
||||||
path = path.with(room);
|
path = path.with(room);
|
||||||
|
if (details) {
|
||||||
path = path.with(details);
|
path = path.with(details);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.navigation.applyPath(path);
|
this.navigation.applyPath(path);
|
||||||
} else {
|
} else {
|
||||||
let path = this.navigation.path.until("session");
|
let path = this.navigation.path.until("session");
|
||||||
@ -108,7 +110,9 @@ export class LeftPanelViewModel extends ViewModel {
|
|||||||
if (room) {
|
if (room) {
|
||||||
path = path.with(this.navigation.segment("rooms", [room.value]));
|
path = path.with(this.navigation.segment("rooms", [room.value]));
|
||||||
path = path.with(room);
|
path = path.with(room);
|
||||||
|
if (details) {
|
||||||
path = path.with(details);
|
path = path.with(details);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
path = path.with(this.navigation.segment("rooms", []));
|
path = path.with(this.navigation.segment("rooms", []));
|
||||||
path = path.with(this.navigation.segment("empty-grid-tile", 0));
|
path = path.with(this.navigation.segment("empty-grid-tile", 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user