anticipate non-found rooms
This commit is contained in:
parent
081820d8fb
commit
afbfb0c82c
2 changed files with 8 additions and 2 deletions
|
@ -132,7 +132,10 @@ export class RoomGridViewModel extends ViewModel {
|
|||
this._viewModels[i] = this.disposeTracked(vm);
|
||||
}
|
||||
if (newId) {
|
||||
this._viewModels[i] = this.track(this._createRoomViewModel(newId));
|
||||
const newVM = this._createRoomViewModel(newId);
|
||||
if (newVM) {
|
||||
this._viewModels[i] = this.track(newVM);
|
||||
}
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,10 @@ export class SessionViewModel extends ViewModel {
|
|||
if (vm) {
|
||||
this._currentRoomViewModel = this.track(vm);
|
||||
} else {
|
||||
this._currentRoomViewModel = this.track(this._createRoomViewModel(currentRoomId.value));
|
||||
const newVM = this._createRoomViewModel(currentRoomId.value);
|
||||
if (newVM) {
|
||||
this._currentRoomViewModel = this.track(newVM);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._gridViewModel = this.disposeTracked(this._gridViewModel);
|
||||
|
|
Reference in a new issue