Stringify properties before filtering (#1929)

This commit is contained in:
Ian Ker-Seymer
2025-03-17 17:43:57 -04:00
committed by GitHub
parent c5711c095f
commit f5d6a36574
2 changed files with 16 additions and 1 deletions
+3 -1
View File
@@ -979,8 +979,10 @@ module Liquid
attr_reader :context
def filter_array(input, property, target_value, default_value = [], &block)
ary = InputIterator.new(input, context)
property = Liquid::Utils.to_s(property)
return default_value if property.empty?
ary = InputIterator.new(input, context)
return default_value if ary.empty?
block.call(ary) do |item|