Skip to content

Commit

Permalink
Fix UI crash due to spare events array (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
goodoldneon committed Mar 5, 2024
1 parent 05b44ce commit 3cf0871
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/coreapi/graph/resolvers/function_run.resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ func (r *functionRunResolver) Events(ctx context.Context, obj *models.FunctionRu
return empty, nil
}

// Will be nil if the run was not triggered by an event (i.e. a cron)
if evt == nil {
return empty, nil
}

return []*models.Event{evt}, nil
}

Expand Down

0 comments on commit 3cf0871

Please sign in to comment.