lib/alma/fine_set.rb in alma-0.3.3 vs lib/alma/fine_set.rb in alma-0.4.0
- old
+ new
@@ -10,10 +10,10 @@
def initialize(raw_response)
@raw_response = raw_response
@response = raw_response.parsed_response
validate(raw_response)
- @results = @response.fetch(key, [])
+ @results = (@response.fetch(key, []) || [])
.map { |item| single_record_class.new(item) }
end
def loggable
{ uri: @raw_response&.request&.uri.to_s