Skip to content

Commit

Permalink
Merge pull request #289 from sanfrancrisko/fix-nil-error-on-parameters
Browse files Browse the repository at this point in the history
Fix rare undefined method `any?' for nil:NilClass error
  • Loading branch information
da-ar authored Aug 2, 2021
2 parents 3ce39ac + 7a01816 commit 5955970
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/puppet-strings/yard/code_objects/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def add_check(check)
end

def parameters
@parameters ||= [] # guard against not filled parameters
# just return params if there are no providers
return @parameters if providers.empty?

Expand Down

0 comments on commit 5955970

Please # to comment.