lib/braintree/xml/parser.rb in braintree-2.1.0 vs lib/braintree/xml/parser.rb in braintree-2.2.0
- old
+ new
@@ -21,10 +21,10 @@
def self._typecast_xml_value(value)
case value.class.to_s
when 'Hash'
if value['type'] == 'array'
child_key, entries = value.detect { |k,v| k != 'type' } # child_key is throwaway
- if entries.nil? || (c = value[CONTENT_ROOT] && c.blank?)
+ if entries.nil? || ((c = value[CONTENT_ROOT]) && c.strip.empty?)
[]
else
case entries.class.to_s # something weird with classes not matching here. maybe singleton methods breaking is_a?
when "Array"
entries.collect { |v| _typecast_xml_value(v) }