diff options
Diffstat (limited to 'src/features/workspaces/store.js')
-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 e11513d1f..3d7043413 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -255,13 +255,15 @@ export default class WorkspacesStore extends FeatureStore { | |||
255 | _setActiveServiceOnWorkspaceSwitchReaction = () => { | 255 | _setActiveServiceOnWorkspaceSwitchReaction = () => { |
256 | if (!this.isFeatureActive) return; | 256 | if (!this.isFeatureActive) return; |
257 | if (this.activeWorkspace) { | 257 | if (this.activeWorkspace) { |
258 | const services = this.stores.services.allDisplayed; | 258 | const activeService = this.stores.services.active; |
259 | const activeService = services.find(s => s.isActive); | ||
260 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); | 259 | const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); |
261 | if (workspaceServices.length <= 0) return; | 260 | if (workspaceServices.length <= 0) return; |
262 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); | 261 | const isActiveServiceInWorkspace = workspaceServices.includes(activeService); |
263 | if (!isActiveServiceInWorkspace) { | 262 | if (!isActiveServiceInWorkspace) { |
264 | this.actions.service.setActive({ serviceId: workspaceServices[0].id }); | 263 | this.actions.service.setActive({ |
264 | serviceId: workspaceServices[0].id, | ||
265 | keepActiveRoute: true, | ||
266 | }); | ||
265 | } | 267 | } |
266 | } | 268 | } |
267 | }; | 269 | }; |