Skip to content

Commit

Permalink
fix: don't panic on multiple deletion SM patches
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Feb 8, 2025
1 parent 3be1af6 commit 7a89623
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/resmap/reswrangler.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ func (m *resWrangler) GetMatchingResourcesByAnyId(
matches IdMatcher) []*resource.Resource {
var result []*resource.Resource
for _, r := range m.rList {
if r.RNode.IsNilOrEmpty() {
continue
}

for _, id := range append(r.PrevIds(), r.CurId()) {
if matches(id) {
result = append(result, r)
Expand Down

0 comments on commit 7a89623

Please sign in to comment.