From 1336bdd8c634b2e82f4482cbb159eca8749b4f28 Mon Sep 17 00:00:00 2001 From: Tsering Paljor Date: Thu, 11 Dec 2025 09:07:27 +0400 Subject: [PATCH] Only access selected when workflow._ is not undefined. (#4414) --- ...fixed_a_crash_when_the_workflow_is_uninitialized.json | 9 +++++++++ .../modules/automation/store/automationWorkflow.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 changelog/entries/unreleased/bug/4293_fixed_a_crash_when_the_workflow_is_uninitialized.json diff --git a/changelog/entries/unreleased/bug/4293_fixed_a_crash_when_the_workflow_is_uninitialized.json b/changelog/entries/unreleased/bug/4293_fixed_a_crash_when_the_workflow_is_uninitialized.json new file mode 100644 index 0000000000..18fbfd442b --- /dev/null +++ b/changelog/entries/unreleased/bug/4293_fixed_a_crash_when_the_workflow_is_uninitialized.json @@ -0,0 +1,9 @@ +{ + "type": "bug", + "message": "Fixed a potential crash while deleting a workflow.", + "issue_origin": "github", + "issue_number": 4293, + "domain": "automation", + "bullet_points": [], + "created_at": "2025-12-10" +} \ No newline at end of file diff --git a/web-frontend/modules/automation/store/automationWorkflow.js b/web-frontend/modules/automation/store/automationWorkflow.js index c72f60c10b..ec1e88a740 100644 --- a/web-frontend/modules/automation/store/automationWorkflow.js +++ b/web-frontend/modules/automation/store/automationWorkflow.js @@ -108,7 +108,7 @@ const actions = { ) }, async forceDelete({ commit }, { automation, workflow }) { - if (workflow._.selected) { + if (workflow._?.selected) { // Redirect back to the dashboard because the workflow doesn't exist anymore. await this.$router.push({ name: 'dashboard' }) commit('UNSELECT')