lib/alma/loan_set.rb in alma-0.3.3 vs lib/alma/loan_set.rb in alma-0.4.0

- old
+ new

@@ -14,11 +14,11 @@ def initialize(raw_response, search_args = {}) @raw_response = raw_response @response = raw_response.parsed_response @search_args = search_args validate(raw_response) - @results = @response.fetch(key, []) - .map { |item| single_record_class.new(item) } + @results = @response.fetch(key, []) || [] + @results.map! { |item| single_record_class.new(item) } # args passed to the search that returned this set # such as limit, expand, order_by, etc end def loggable