mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Make all array filters that use filter_array util process empty string and nil correctly
This commit is contained in:
@@ -986,8 +986,11 @@ module Liquid
|
||||
attr_reader :context
|
||||
|
||||
def filter_array(input, property, target_value, default_value = [], &block)
|
||||
if property.nil?
|
||||
raise_property_error(property)
|
||||
end
|
||||
|
||||
property = Liquid::Utils.to_s(property)
|
||||
return default_value if property.empty?
|
||||
|
||||
ary = InputIterator.new(input, context)
|
||||
return default_value if ary.empty?
|
||||
|
||||
Reference in New Issue
Block a user