adding null check to external-posts.rb to avoid parsing failure (#2347)

Adjusting issue #2343 by adding null check.
This commit is contained in:
Billy Chau 2024-04-16 12:32:44 -05:00 committed by GitHub
parent 363f277aa8
commit 9ab7391381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ module ExternalPosts
site.config['external_sources'].each do |src|
p "Fetching external posts from #{src['name']}:"
xml = HTTParty.get(src['rss_url']).body
return if xml.nil?
feed = Feedjira.parse(xml)
feed.entries.each do |e|
p "...fetching #{e.url}"