Commit 59826b3a authored by 邓超's avatar 邓超

fix: 修改工作流编辑器为空界面报错bug

parent 846cc489
Pipeline #58681 passed with stages
......@@ -45,8 +45,14 @@ const Workflow = () => {
}, []);
useEffect(() => {
if (flag === 2) {
console.log(treeData);
console.log(treeData, 'treeData');
if (treeData.length === 0) {
return;
}
setExpandedKey(treeData[0].name + 0);
if (!treeData[0].children) {
return;
}
setCurrentSelectId(treeData[0].children[0].FlowID);
setTreeId(treeData[0].children[0].FlowID);
GetFlowNode({ flowID: treeData[0].children[0].FlowID }).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment