lib/peddler/xml_response_parser.rb in peddler-1.1.0 vs lib/peddler/xml_response_parser.rb in peddler-1.1.1

- old
+ new

@@ -8,12 +8,13 @@ end private def find_data - results = xml.values.first.find { |k, _| k.include?('Result') } || - xml.values.first.find { |k, _| k == 'Message' } + payload = xml.values.first + found = payload.find { |k, _| k.include?('Result') } || + payload.find { |k, _| k == 'Message' } - results ? results.last : nil + found.last if found end end end