diff --git a/src/utils/convertFlowData.ts b/src/utils/convertFlowData.ts index 6d9e862..351ec0d 100644 --- a/src/utils/convertFlowData.ts +++ b/src/utils/convertFlowData.ts @@ -11,7 +11,7 @@ export const convertFlowData = (flowData: any, useDefault = true) => { const nodes: any[] = []; const edges: any[] = []; - if (!flowData || Object.keys(flowData).length === 0) { + if (!flowData || Object.keys(flowData).length === 0 || flowData.main.nodeConfigs.length === 0) { // 如果useDefault为true且flowData为空,则返回默认的开始和结束节点 if (useDefault) { return { @@ -34,7 +34,7 @@ export const convertFlowData = (flowData: any, useDefault = true) => { { id: 'end', type: 'end', - position: { x: 1200, y: 200 }, + position: { x: 600, y: 200 }, data: { title: '结束', parameters: {