优化蓝图错误判断

This commit is contained in:
boyce
2026-04-03 11:52:35 +08:00
parent b371237dde
commit 966efbd2d0
2 changed files with 2 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ func (bm *Blueprint) TriggerEvent(graphID int64, eventID int64, args ...any) err
func (bm *Blueprint) Do(graphID int64, entranceID int64, args ...any) (Port_Array, error) {
graph := bm.mapGraph[graphID]
if graph == nil {
return nil, fmt.Errorf("can not find graph:%d", graphID)
return nil, nil
}
clone := graph.Clone()

View File

@@ -160,7 +160,7 @@ func (gr *Graph) Do(entranceID int64, args ...any) (Port_Array, error) {
entranceNode := gr.entrance[entranceID]
if entranceNode == nil {
return nil, fmt.Errorf("entranceID:%d not found", entranceID)
return nil, nil
}
gr.variables = map[string]IPort{}