Skip to content

Commit

Permalink
Check len == 0 instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
BadLiveware committed Jul 6, 2023
1 parent f8ae66e commit 712582c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (c *gatewayRouteResolver) resolve(rt gatewayRoute) (map[string]endpoint.Tar
}
override := getTargetsFromTargetAnnotation(gw.gateway.Annotations)
hostTargets[host] = append(hostTargets[host], override...)
if override == nil {
if len(override) == 0 {
for _, addr := range gw.gateway.Status.Addresses {
hostTargets[host] = append(hostTargets[host], addr.Value)
}
Expand Down

0 comments on commit 712582c

Please sign in to comment.