mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Close saving modal when workflow is new (#14836)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import WorkflowExecutionsSidebar from '@/components/executions/workflow/WorkflowExecutionsSidebar.vue';
|
||||
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
import { useWorkflowSaving } from '@/composables/useWorkflowSaving';
|
||||
import { MAIN_HEADER_TABS } from '@/constants';
|
||||
import type { ExecutionFilterType, IWorkflowDb } from '@/Interface';
|
||||
import { getNodeViewTab } from '@/utils/nodeViewUtils';
|
||||
@@ -33,7 +33,8 @@ const emit = defineEmits<{
|
||||
reload: [];
|
||||
}>();
|
||||
|
||||
const workflowHelpers = useWorkflowHelpers({ router: useRouter() });
|
||||
const router = useRouter();
|
||||
const { promptSaveUnsavedWorkflowChanges } = useWorkflowSaving({ router });
|
||||
|
||||
const temporaryExecution = computed<ExecutionSummary | undefined>(() =>
|
||||
props.executions.find((execution) => execution.id === props.execution?.id)
|
||||
@@ -72,7 +73,7 @@ onBeforeRouteLeave(async (to, _, next) => {
|
||||
return;
|
||||
}
|
||||
|
||||
await workflowHelpers.promptSaveUnsavedWorkflowChanges(next);
|
||||
await promptSaveUnsavedWorkflowChanges(next);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user