cleaned up resource refactoring

This commit is contained in:
Natasha Sarkar
2021-02-03 14:30:25 -08:00
parent cd918483f9
commit 43157f5d35
9 changed files with 62 additions and 62 deletions

View File

@@ -168,10 +168,8 @@ func (m *resWrangler) GetMatchingResourcesByAnyId(
matches IdMatcher) []*resource.Resource {
var result []*resource.Resource
for _, r := range m.rList {
prevIds := r.PrevIds()
prevIds = append(prevIds, r.CurId())
for _, prevId := range prevIds {
if matches(prevId) {
for _, id := range append(r.PrevIds(), r.CurId()) {
if matches(id) {
result = append(result, r)
break
}