diff options
-rw-r--r-- | src/features/workspaces/store.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 6118df79a..07b16ff23 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -312,9 +312,12 @@ export default class WorkspacesStore extends FeatureStore { | |||
312 | 312 | ||
313 | _cleanupInvalidServiceReferences = () => { | 313 | _cleanupInvalidServiceReferences = () => { |
314 | const { services } = this.stores; | 314 | const { services } = this.stores; |
315 | const { allServicesRequest } = services; | ||
316 | const servicesHaveBeenLoaded = allServicesRequest.wasExecuted && !allServicesRequest.isError; | ||
317 | // Loop through all workspaces and remove invalid service ids (locally) | ||
315 | this.workspaces.forEach((workspace) => { | 318 | this.workspaces.forEach((workspace) => { |
316 | workspace.services.forEach((serviceId) => { | 319 | workspace.services.forEach((serviceId) => { |
317 | if (services.allServicesRequest.wasExecuted && !services.one(serviceId)) { | 320 | if (servicesHaveBeenLoaded && !services.one(serviceId)) { |
318 | workspace.services.remove(serviceId); | 321 | workspace.services.remove(serviceId); |
319 | } | 322 | } |
320 | }); | 323 | }); |