diff options
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/store.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index e0bef8aea..51a7f3651 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -267,13 +267,15 @@ export default class WorkspacesStore extends FeatureStore { | |||
267 | _setActiveServiceOnWorkspaceSwitchReaction = () => { | 267 | _setActiveServiceOnWorkspaceSwitchReaction = () => { |
268 | if (!this.isFeatureActive) return; | 268 | if (!this.isFeatureActive) return; |
269 | if (this.activeWorkspace) { | 269 | if (this.activeWorkspace) { |
270 | const services = this.stores.services.allDisplayed; | 270 | const activeService = this.stores.services.active; |
271 | const activeService = services.find(s => s.isActive); | ||
272 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); | 271 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); |
273 | if (workspaceServices.length <= 0) return; | 272 | if (workspaceServices.length <= 0) return; |
274 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); | 273 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); |
275 | if (!isActiveServiceInWorkspace) { | 274 | if (!isActiveServiceInWorkspace) { |
276 | this.actions.service.setActive({ serviceId: workspaceServices[0].id }); | 275 | this.actions.service.setActive({ |
276 | serviceId: workspaceServices[0].id, | ||
277 | keepActiveRoute: true, | ||
278 | }); | ||
277 | } | 279 | } |
278 | } | 280 | } |
279 | }; | 281 | }; |