From 332fbdda846b4e046f741fdcc4a3a7a459519864 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 4 Jun 2021 18:37:32 +0530 Subject: [PATCH] Move variable to scope of conditional Signed-off-by: RMidhunSuresh --- src/domain/session/SessionViewModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/session/SessionViewModel.js b/src/domain/session/SessionViewModel.js index 21b88e8a..ab59c2af 100644 --- a/src/domain/session/SessionViewModel.js +++ b/src/domain/session/SessionViewModel.js @@ -258,9 +258,9 @@ export class SessionViewModel extends ViewModel { _toggleRoomInformationPanel() { this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel); - const room = this._roomFromNavigation(); const enable = !!this.navigation.path.get("details")?.value; if (enable) { + const room = this._roomFromNavigation(); this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room }))); } this.emitChange("roomInfoViewModel");