mirror of
https://github.com/duanhf2012/origin.git
synced 2026-04-07 08:07:30 +08:00
优化蓝图错误判断
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user