lib/fassbinder/response.rb in fassbinder-0.0.13 vs lib/fassbinder/response.rb in fassbinder-0.0.14
- old
+ new
@@ -41,10 +41,10 @@
builder.asin = doc['ASIN']
builder.offers_total = doc['Offers']['TotalOffers']
host = Sucker::Request::HOSTS[@locale]
builder.venue = "amazon.#{host.match(/[^.]+$/)}"
- offers = [doc['Offers']['Offer']].flatten
+ offers = [doc['Offers']['Offer']].flatten.compact
offers.each { |offer| builder.add_offer(offer) }
builder.book
end
end