mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Update workflow re-initialization to use query parameter (#12650)
This commit is contained in:
@@ -1000,9 +1000,10 @@ export function useWorkflowHelpers(options: { router: ReturnType<typeof useRoute
|
||||
}
|
||||
|
||||
if (redirect) {
|
||||
void router.replace({
|
||||
await router.replace({
|
||||
name: VIEWS.WORKFLOW,
|
||||
params: { name: workflowData.id, action: 'workflowSave' },
|
||||
params: { name: workflowData.id },
|
||||
query: { action: 'workflowSave' },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -308,8 +308,13 @@ async function initializeData() {
|
||||
async function initializeRoute(force = false) {
|
||||
// In case the workflow got saved we do not have to run init
|
||||
// as only the route changed but all the needed data is already loaded
|
||||
if (route.params.action === 'workflowSave') {
|
||||
|
||||
if (route.query.action === 'workflowSave') {
|
||||
uiStore.stateIsDirty = false;
|
||||
// Remove the action from the query
|
||||
await router.replace({
|
||||
query: { ...route.query, action: undefined },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3392,10 +3392,15 @@ export default defineComponent({
|
||||
async initView(): Promise<void> {
|
||||
await this.loadCredentialsForWorkflow();
|
||||
|
||||
if (this.$route.params.action === 'workflowSave') {
|
||||
if (this.$route.query.action === 'workflowSave') {
|
||||
// In case the workflow got saved we do not have to run init
|
||||
// as only the route changed but all the needed data is already loaded
|
||||
this.uiStore.stateIsDirty = false;
|
||||
|
||||
// Remove the action from the query
|
||||
await this.$router.replace({
|
||||
query: { ...this.$route.query, action: undefined },
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.blankRedirect) {
|
||||
|
||||
Reference in New Issue
Block a user