mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
Fix array has filters referring to some (#1910)
This commit is contained in:
@@ -456,7 +456,7 @@ module Liquid
|
|||||||
# Tests if any item in an array has a specific property value.
|
# Tests if any item in an array has a specific property value.
|
||||||
# @liquid_description
|
# @liquid_description
|
||||||
# This requires you to provide both the property name and the associated value.
|
# This requires you to provide both the property name and the associated value.
|
||||||
# @liquid_syntax array | some: string, string
|
# @liquid_syntax array | has: string, string
|
||||||
# @liquid_return [boolean]
|
# @liquid_return [boolean]
|
||||||
def has(input, property, target_value = nil)
|
def has(input, property, target_value = nil)
|
||||||
filter_array(input, property, target_value, false) { |ary, &block| ary.any?(&block) }
|
filter_array(input, property, target_value, false) { |ary, &block| ary.any?(&block) }
|
||||||
|
|||||||
Reference in New Issue
Block a user