mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge pull request #1951 from Shopify/actual-revert
Fully revert calling to_s on filter array
This commit is contained in:
@@ -982,8 +982,6 @@ module Liquid
|
||||
|
||||
return default_value if ary.empty?
|
||||
|
||||
property = Utils.to_s(property)
|
||||
|
||||
block.call(ary) do |item|
|
||||
if target_value.nil?
|
||||
item[property]
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Liquid
|
||||
VERSION = "5.8.5"
|
||||
VERSION = "5.8.6"
|
||||
end
|
||||
|
||||
@@ -1054,10 +1054,11 @@ class StandardFiltersTest < Minitest::Test
|
||||
|
||||
def test_where_with_nil_is_a_no_op
|
||||
environment = { "array" => ["alpha", "beta", "gamma"] }
|
||||
expected_output = "alpha beta gamma"
|
||||
template = "{{ array | where: nil | join: ' ' }}"
|
||||
|
||||
assert_template_result(expected_output, template, environment)
|
||||
assert_raises(Liquid::ArgumentError) do
|
||||
assert_template_result("alpha beta gamma", template, environment)
|
||||
end
|
||||
end
|
||||
|
||||
def test_where_with_value
|
||||
|
||||
Reference in New Issue
Block a user