Skip to content

Commit 2e33024

Browse files
author
Kevin Paulisse
committed
Avoid unnecessary buildup of empty arrays that have to be removed later
1 parent bcaf823 commit 2e33024

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/octocatalog-diff/catalog.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def validate_references
191191
next unless x.key?('parameters')
192192
next unless x['parameters'].key?(r)
193193
missing_resources = remove_existing_resources(x['parameters'][r])
194+
next unless missing_resources.any?
194195
missing << missing_resources.map { |missing_target| { source: x, target_type: r, target_value: missing_target } }
195196
end
196197
end

0 commit comments

Comments
 (0)