File tree 1 file changed +6
-3
lines changed
packages/editor-ui/src/views
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ async function initializeData() {
291
291
}
292
292
}
293
293
294
- async function initializeRoute() {
294
+ async function initializeRoute(force = false ) {
295
295
// In case the workflow got saved we do not have to run init
296
296
// as only the route changed but all the needed data is already loaded
297
297
if (route .params .action === ' workflowSave' ) {
@@ -300,6 +300,7 @@ async function initializeRoute() {
300
300
}
301
301
302
302
const isAlreadyInitialized =
303
+ ! force &&
303
304
initializedWorkflowId .value &&
304
305
[NEW_WORKFLOW_ID , workflowId .value ].includes (initializedWorkflowId .value );
305
306
@@ -1489,8 +1490,10 @@ function unregisterCustomActions() {
1489
1490
1490
1491
watch (
1491
1492
() => route .name ,
1492
- async () => {
1493
- await initializeRoute ();
1493
+ async (newRouteName , oldRouteName ) => {
1494
+ // it's navigating from and existing workflow to a new workflow
1495
+ const force = newRouteName === VIEWS .NEW_WORKFLOW && oldRouteName === VIEWS .WORKFLOW ;
1496
+ await initializeRoute (force );
1494
1497
},
1495
1498
);
1496
1499
You can’t perform that action at this time.
0 commit comments