From 1e38ec5e524c71ae89cd7d4956736494b8c13886 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Wed, 8 May 2019 17:02:09 +0200 Subject: fix(Announcements): Fixes issue with rendering announcments in workspaces --- src/features/workspaces/store.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/features/workspaces') 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 { _setActiveServiceOnWorkspaceSwitchReaction = () => { if (!this.isFeatureActive) return; if (this.activeWorkspace) { - const services = this.stores.services.allDisplayed; - const activeService = services.find(s => s.isActive); + const activeService = this.stores.services.active; const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); if (workspaceServices.length <= 0) return; const isActiveServiceInWorkspace = workspaceServices.includes(activeService); if (!isActiveServiceInWorkspace) { - this.actions.service.setActive({ serviceId: workspaceServices[0].id }); + this.actions.service.setActive({ + serviceId: workspaceServices[0].id, + keepActiveRoute: true, + }); } } }; -- cgit v1.2.3-70-g09d2