Skip to content

Commit

Permalink
fix: check for resource selector being empty in matches (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored Mar 14, 2024
1 parent ef65311 commit fb9b1e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/resource_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func (c ResourceSelector) Hash() string {
}

func (rs ResourceSelector) Matches(s ResourceSelectable) bool {
if rs.IsEmpty() {
return false
}
if rs.ID != "" && rs.ID != s.GetID() {
return false
}
Expand Down

0 comments on commit fb9b1e1

Please sign in to comment.