Sparkle: Account for empty pubDate
This commit is contained in:
parent
e7d3b2cb31
commit
a5768de0c3
@ -75,7 +75,7 @@ module Homebrew
|
||||
version ||= (item > "version").first&.text&.strip
|
||||
|
||||
title = (item > "title").first&.text&.strip
|
||||
pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) }
|
||||
pub_date = (item > "pubDate").first&.text&.strip&.presence&.yield_self { |d| Time.parse(d) }
|
||||
|
||||
if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/))
|
||||
short_version ||= match[1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user