refactor flowchart
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

This commit is contained in:
2026-04-11 02:14:53 -06:00
parent 8521c67e68
commit 1f18f363eb
5 changed files with 31 additions and 14 deletions

View File

@@ -106,7 +106,7 @@ async function submitFlowchartData(flowchartEditorRef: any) {
// 获取流程图的JSON数据
const flowchartData = flowchartEditorRef.value.getFlowchartData()
if (flowchartData.nodes.length === 0 || flowchartData.edges.length === 0) {
if (!flowchartData?.nodes?.length || !flowchartData?.edges?.length) {
message.error("流程图节点或边不能为空")
return
}