Sparkle: Account for nil content value

`content` can be `nil` when a request doesn't succeed but
`#versions_from_content` expects a `String` value, so we need to
guard against a `nil` value like we do in other strategies.
This commit is contained in:
Sam Ford 2023-04-29 00:23:41 -04:00
parent 1c03018b6a
commit 6597ee6fd3
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -190,6 +190,7 @@ module Homebrew
match_data.merge!(Strategy.page_content(url))
content = match_data.delete(:content)
return match_data if content.blank?
versions_from_content(content, regex, &block).each do |version_text|
match_data[:matches][version_text] = Version.new(version_text)