mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20: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_syntax array | map: string
|
||||||
# @liquid_return [array[untyped]]
|
# @liquid_return [array[untyped]]
|
||||||
def map(input, property)
|
def map(input, property)
|
||||||
|
if property.nil?
|
||||||
|
raise_property_error(property)
|
||||||
|
end
|
||||||
|
|
||||||
property = Utils.to_s(property)
|
property = Utils.to_s(property)
|
||||||
InputIterator.new(input, context).map do |e|
|
InputIterator.new(input, context).map do |e|
|
||||||
e = e.call if e.is_a?(Proc)
|
e = e.call if e.is_a?(Proc)
|
||||||
|
|||||||
Reference in New Issue
Block a user