mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 04:27:40 +01:00
Make sure room does exist before creating vm
- This will stop the code from throwing when opening /details on UnknownRoomView. Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
a273b25bac
commit
eb35f46214
@ -261,6 +261,7 @@ export class SessionViewModel extends ViewModel {
|
||||
const enable = !!this.navigation.path.get("details")?.value;
|
||||
if (enable) {
|
||||
const room = this._roomFromNavigation();
|
||||
if (!room) { return; }
|
||||
this._roomDetailsViewModel = this.track(new RoomDetailsViewModel(this.childOptions({room})));
|
||||
}
|
||||
this.emitChange("roomDetailsViewModel");
|
||||
|
Loading…
x
Reference in New Issue
Block a user