lib/salestation/web/extractors.rb in salestation-4.0.1 vs lib/salestation/web/extractors.rb in salestation-4.0.2

- old
+ new

@@ -123,11 +123,13 @@ when Symbol stringified_key = filter.to_s extracted_data[filter] = request_hash[stringified_key] if request_hash.key?(stringified_key) when Hash filter.each do |key, nested_filters| - if request_hash.key?(key.to_s) - extracted_data[key] = extract(nested_filters, request_hash.fetch(key.to_s)) + stringified_key = key.to_s + if request_hash.key?(stringified_key) + value = request_hash.fetch(stringified_key) + extracted_data[key] = value.nil? ? nil : extract(nested_filters, value) end end end end end