mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 01:10:41 -07:00
also do it for map
This commit is contained in:
@@ -536,6 +536,10 @@ module Liquid
|
||||
# @liquid_syntax array | map: string
|
||||
# @liquid_return [array[untyped]]
|
||||
def map(input, property)
|
||||
if property.nil?
|
||||
raise_property_error(property)
|
||||
end
|
||||
|
||||
property = Utils.to_s(property)
|
||||
InputIterator.new(input, context).map do |e|
|
||||
e = e.call if e.is_a?(Proc)
|
||||
|
||||
Reference in New Issue
Block a user