diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 41cd30ebd7b..cab599b6bc9 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -934,20 +934,22 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { }, __connectContexts: function() { - const workspaceHeader = this.__workspaceHeader; - workspaceHeader.addListener("contextChanged", () => { - const workspaceId = workspaceHeader.getCurrentWorkspaceId(); - const folderId = workspaceHeader.getCurrentFolderId(); - this.__changeContext(workspaceId, folderId); - }, this); + if (osparc.utils.DisabledPlugins.isFoldersEnabled()) { + const workspaceHeader = this.__workspaceHeader; + workspaceHeader.addListener("contextChanged", () => { + const workspaceId = workspaceHeader.getCurrentWorkspaceId(); + const folderId = workspaceHeader.getCurrentFolderId(); + this.__changeContext(workspaceId, folderId); + }, this); - const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree(); - workspacesAndFoldersTree.addListener("contextChanged", e => { - const context = e.getData(); - const workspaceId = context["workspaceId"]; - const folderId = context["folderId"]; - this.__changeContext(workspaceId, folderId); - }, this); + const workspacesAndFoldersTree = this._resourceFilter.getWorkspacesAndFoldersTree(); + workspacesAndFoldersTree.addListener("contextChanged", e => { + const context = e.getData(); + const workspaceId = context["workspaceId"]; + const folderId = context["folderId"]; + this.__changeContext(workspaceId, folderId); + }, this); + } }, __changeContext: function(workspaceId, folderId) {