Support empty categories

This commit is contained in:
syeopite 2021-10-13 11:32:27 -07:00
parent e3054ccdd2
commit b49b5fbda9
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -321,11 +321,13 @@ private module Parsers
content_container = item_contents["contents"]
end
raw_contents = content_container["items"].as_a
raw_contents.each do |item|
result = extract_item(item)
if !result.nil?
contents << result
raw_contents = content_container["items"]?.try &.as_a
if !raw_contents.nil?
raw_contents.each do |item|
result = extract_item(item)
if !result.nil?
contents << result
end
end
end