Skip to content

Commit

Permalink
[release-1.11] fix the type coercion of triggers in the broker filter (
Browse files Browse the repository at this point in the history
…#7478)

fix the type coercion of triggers in the broker filter

Signed-off-by: Calum Murray <[email protected]>
  • Loading branch information
Cali0707 authored Nov 29, 2023
1 parent 05b92c7 commit 4052367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/broker/filter/filter_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func NewHandler(logger *zap.Logger, triggerInformer v1.TriggerInformer, reporter

triggerInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
trigger, ok := obj.(eventingv1.Trigger)
trigger, ok := obj.(*eventingv1.Trigger)
if !ok {
return
}
Expand All @@ -112,7 +112,7 @@ func NewHandler(logger *zap.Logger, triggerInformer v1.TriggerInformer, reporter
})
},
UpdateFunc: func(_, obj interface{}) {
trigger, ok := obj.(eventingv1.Trigger)
trigger, ok := obj.(*eventingv1.Trigger)
if !ok {
return
}
Expand All @@ -122,7 +122,7 @@ func NewHandler(logger *zap.Logger, triggerInformer v1.TriggerInformer, reporter
})
},
DeleteFunc: func(obj interface{}) {
trigger, ok := obj.(eventingv1.Trigger)
trigger, ok := obj.(*eventingv1.Trigger)
if !ok {
return
}
Expand Down

0 comments on commit 4052367

Please sign in to comment.