reddit: fix exception when work_id is nil.

This commit is contained in:
evazion
2022-11-05 01:26:47 -05:00
parent 28237e2e09
commit 60efde0e68

View File

@@ -50,7 +50,7 @@ module Source
end
def data
return nil if work_id.blank?
return {} if work_id.blank?
response = http.cache(1.minute).get("https://reddit.com/gallery/#{work_id}")
return {} if response.status != 200