fix(editor): Fix bug causing workflow debugging to not work in new canvas (no-changelog) (#10384)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions

This commit is contained in:
Alex Grozav 2024-08-13 23:14:06 +03:00 committed by GitHub
parent 1e310f40f7
commit dfd712a45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@ import {
onMounted,
ref,
useCssModule,
watch,
} from 'vue';
import { useRoute, useRouter } from 'vue-router';
import WorkflowCanvas from '@/components/canvas/WorkflowCanvas.vue';
@ -288,6 +289,7 @@ async function initializeRoute() {
nodeHelpers.updateNodesParameterIssues();
await loadCredentials();
await initializeDebugMode();
}
async function initializeWorkspaceForNewWorkflow() {
@ -306,7 +308,6 @@ async function initializeWorkspaceForExistingWorkflow(id: string) {
const workflowData = await workflowsStore.fetchWorkflow(id);
await openWorkflow(workflowData);
await initializeDebugMode();
if (workflowData.meta?.onboardingId) {
trackOpenWorkflowFromOnboardingTemplate();
@ -748,6 +749,7 @@ async function importWorkflowExact({ workflow: workflowData }: { workflow: IWork
resetWorkspace();
await initializeData();
await initializeWorkspace({
...workflowData,
nodes: NodeViewUtils.getFixedNodesList<INodeUi>(workflowData.nodes),
@ -1370,6 +1372,21 @@ function registerCustomActions() {
// });
}
/**
* Routing
*/
watch(
() => route.name,
async () => {
if (!checkIfEditingIsAllowed()) {
return;
}
await initializeRoute();
},
);
/**
* Lifecycle
*/