From 25558bc801d61603ca7fd0d9f3a8705caf399d9b Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Mon, 25 Mar 2024 14:15:26 +0200 Subject: [PATCH] =?UTF-8?q?=C2=A0=C2=A0fix:=20trying=20to=20fix=20cors=20o?= =?UTF-8?q?n=20flow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/modules/diagram/components/opened-flow-diagram.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue b/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue index 8ee98eac4..c8f99d45f 100644 --- a/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue +++ b/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue @@ -52,7 +52,9 @@ export default { async initDiagram() { const flowDiagramUrl = import.meta.env.VITE_FLOW_DIAGRAM_URL; const script = document.createElement('script'); - script.src = `${flowDiagramUrl}/WtFlowDiagram.umd.min.js`; + // script.type = 'module'; + script.src = `${flowDiagramUrl}/WtFlowDiagram.umd.cjs`; + script.onload = () => { const params = { // if edit, restore diagram @@ -82,7 +84,7 @@ export default { }, }, }; - const WtFlowDiagram = window.WtFlowDiagram.default; + const WtFlowDiagram = window.WtFlowDiagram; this.diagram = new WtFlowDiagram('#flow-diagram', params); const onSave = async ({