mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Always return boolean in has filter
This commit is contained in:
@@ -460,7 +460,7 @@ module Liquid
|
||||
# @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) }
|
||||
filter_array(input, property, target_value, false) { |ary, &block| ary.any?(&block) } || false
|
||||
end
|
||||
|
||||
# @liquid_public_docs
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Liquid
|
||||
VERSION = "5.8.3"
|
||||
VERSION = "5.8.4"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user