lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.85.0 vs lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.86.0

- old
+ new

@@ -212,19 +212,19 @@ def parse(xml) response = {} doc = Nokogiri::XML(xml) - doc.root.xpath('*').each do |node| + doc.root&.xpath('*')&.each do |node| if (node.elements.size == 0) response[node.name.downcase.to_sym] = node.text else node.elements.each do |childnode| name = childnode.name.downcase response[name.to_sym] = childnode.text end end - end unless doc.root.nil? + end response end def authorization_from(action, response, amount, currency)