Skip to content

Commit

Permalink
Merge pull request kubewharf#196 from JackZxj/refactor/npe-in-follower
Browse files Browse the repository at this point in the history
fix(follower-controller): nil pointer error
  • Loading branch information
mrlihanbo authored Aug 9, 2023
2 parents d89a6b6 + 48aae48 commit 161a766
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controllers/follower/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ func NewFollowerController(
)

if err := c.informerManager.AddFTCUpdateHandler(func(_, latest *fedcorev1a1.FederatedTypeConfig) {
if latest == nil {
return
}
targetType := latest.Spec.SourceType
targetGK := schema.GroupKind{Group: targetType.Group, Kind: targetType.Kind}

Expand Down

0 comments on commit 161a766

Please sign in to comment.