Fix array has filters referring to some (#1910)

This commit is contained in:
Max Stoiber 2025-02-12 08:37:49 -08:00 committed by GitHub
parent bfe29e11be
commit 040801b32c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -456,7 +456,7 @@ module Liquid
# Tests if any item in an array has a specific property value.
# @liquid_description
# 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]
def has(input, property, target_value = nil)
filter_array(input, property, target_value, false) { |ary, &block| ary.any?(&block) }