mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Move variable to scope of conditional
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
7fbcf89539
commit
332fbdda84
@ -258,9 +258,9 @@ export class SessionViewModel extends ViewModel {
|
|||||||
|
|
||||||
_toggleRoomInformationPanel() {
|
_toggleRoomInformationPanel() {
|
||||||
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
|
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
|
||||||
const room = this._roomFromNavigation();
|
|
||||||
const enable = !!this.navigation.path.get("details")?.value;
|
const enable = !!this.navigation.path.get("details")?.value;
|
||||||
if (enable) {
|
if (enable) {
|
||||||
|
const room = this._roomFromNavigation();
|
||||||
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
|
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
|
||||||
}
|
}
|
||||||
this.emitChange("roomInfoViewModel");
|
this.emitChange("roomInfoViewModel");
|
||||||
|
Loading…
Reference in New Issue
Block a user