fix(editor): Fix routing between workflow editing and new workflow pages (#14031)

This commit is contained in:
Csaba Tuncsik
2025-03-19 06:02:58 +01:00
committed by GitHub
parent ebf912dd30
commit 6817abe47f
3 changed files with 50 additions and 2 deletions

View File

@@ -1612,8 +1612,10 @@ function showAddFirstStepIfEnabled() {
watch(
() => route.name,
async (newRouteName, oldRouteName) => {
// it's navigating from and existing workflow to a new workflow
const force = newRouteName === VIEWS.NEW_WORKFLOW && oldRouteName === VIEWS.WORKFLOW;
// When navigating from an existing workflow to a new workflow or the other way around we should load the new workflow
const force =
(newRouteName === VIEWS.NEW_WORKFLOW && oldRouteName === VIEWS.WORKFLOW) ||
(newRouteName === VIEWS.WORKFLOW && oldRouteName === VIEWS.NEW_WORKFLOW);
await initializeRoute(force);
},
);