From 551fb6d7a2e59fe1b93183745962d9eff4741d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 17 Jun 2024 18:24:56 +0200 Subject: [PATCH] fix(editor): Active toggle incorrectly displayed as inactive in execution view (#9778) --- .../src/components/MainHeader/MainHeader.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/MainHeader/MainHeader.vue b/packages/editor-ui/src/components/MainHeader/MainHeader.vue index 8f484042cb..c70b3a573d 100644 --- a/packages/editor-ui/src/components/MainHeader/MainHeader.vue +++ b/packages/editor-ui/src/components/MainHeader/MainHeader.vue @@ -98,9 +98,21 @@ export default defineComponent({ beforeMount() { this.pushConnection.initialize(); }, - mounted() { + async mounted() { this.dirtyState = this.uiStore.stateIsDirty; this.syncTabsWithRoute(this.$route); + + if (this.workflowsStore.workflow.id === PLACEHOLDER_EMPTY_WORKFLOW_ID) { + const workflowId = this.$route.params.name as string; + const workflow = await this.workflowsStore.fetchWorkflow(workflowId); + + this.workflowsStore.setWorkflowId(workflowId); + + if (workflow.active) { + this.workflowsStore.setWorkflowActive(workflowId); + this.workflowsStore.setActive(workflow.active); + } + } }, beforeUnmount() { this.pushConnection.terminate();