From ad0a7ebcb990e8bc9589f215599564f447908fd7 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Mon, 22 Dec 2025 11:33:08 +0800 Subject: [PATCH] feat(web): Workflow --- web/src/views/Workflow/hooks/useWorkflowGraph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/views/Workflow/hooks/useWorkflowGraph.ts b/web/src/views/Workflow/hooks/useWorkflowGraph.ts index 26b1eacc..3ec141dc 100644 --- a/web/src/views/Workflow/hooks/useWorkflowGraph.ts +++ b/web/src/views/Workflow/hooks/useWorkflowGraph.ts @@ -75,7 +75,7 @@ export const useWorkflowGraph = ({ if (nodes.length) { const nodeList = nodes.map(node => { - const { id, type, name, position, config } = node + const { id, type, name, position, config = {} } = node let nodeLibraryConfig = [...nodeLibrary] .flatMap(category => category.nodes) .find(n => n.type === type) @@ -84,7 +84,7 @@ export const useWorkflowGraph = ({ if (nodeLibraryConfig?.config) { Object.keys(nodeLibraryConfig.config).forEach(key => { if (nodeLibraryConfig.config && nodeLibraryConfig.config[key]) { - nodeLibraryConfig.config[key].defaultValue = config[key] + nodeLibraryConfig.config[key].defaultValue = config[key] || {} } }) }