Skip to content

Commit 369777e

Browse files
authored
🐛 [Frontend] Fix for Folders disabled scenario (#6488)
1 parent cd50cbe commit 369777e

File tree

1 file changed

+15
-13
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+15
-13
lines changed

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -934,20 +934,22 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
934934
},
935935

936936
__connectContexts: function() {
937-
const workspaceHeader = this.__workspaceHeader;
938-
workspaceHeader.addListener("contextChanged", () => {
939-
const workspaceId = workspaceHeader.getCurrentWorkspaceId();
940-
const folderId = workspaceHeader.getCurrentFolderId();
941-
this.__changeContext(workspaceId, folderId);
942-
}, this);
937+
if (osparc.utils.DisabledPlugins.isFoldersEnabled()) {
938+
const workspaceHeader = this.__workspaceHeader;
939+
workspaceHeader.addListener("contextChanged", () => {
940+
const workspaceId = workspaceHeader.getCurrentWorkspaceId();
941+
const folderId = workspaceHeader.getCurrentFolderId();
942+
this.__changeContext(workspaceId, folderId);
943+
}, this);
943944

944-
const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree();
945-
workspacesAndFoldersTree.addListener("contextChanged", e => {
946-
const context = e.getData();
947-
const workspaceId = context["workspaceId"];
948-
const folderId = context["folderId"];
949-
this.__changeContext(workspaceId, folderId);
950-
}, this);
945+
const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree();
946+
workspacesAndFoldersTree.addListener("contextChanged", e => {
947+
const context = e.getData();
948+
const workspaceId = context["workspaceId"];
949+
const folderId = context["folderId"];
950+
this.__changeContext(workspaceId, folderId);
951+
}, this);
952+
}
951953
},
952954

953955
__changeContext: function(workspaceId, folderId) {

0 commit comments

Comments
 (0)