Skip to content

Commit

Permalink
return from dispatcher early if observer is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
pepov committed Sep 22, 2020
1 parent a4f198a commit 4862b8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/reconciler/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func (r *Dispatcher) Reconcile(req ctrl.Request) (ctrl.Result, error) {
if err != nil {
return reconcile.Result{}, errors.WithStack(err)
}
if object == nil {
return reconcile.Result{}, nil
}
if r.ResourceFilter != nil {
shouldReconcile, err := r.ResourceFilter(object)
if err != nil || !shouldReconcile {
Expand Down

0 comments on commit 4862b8a

Please sign in to comment.