Use to_liquid_value in uniq filter (#1948)

* Use to_liquid_value in uniq filter

* Bump version to 5.8.4
This commit is contained in:
Ian Ker-Seymer
2025-04-09 15:00:01 -04:00
committed by GitHub
parent 2b75bfaff4
commit dbe709c3bf
4 changed files with 50 additions and 2 deletions
+4 -1
View File
@@ -1081,7 +1081,10 @@ module Liquid
end
def uniq(&block)
to_a.uniq(&block)
to_a.uniq do |item|
item = Utils.to_liquid_value(item)
block ? yield(item) : item
end
end
def compact
+1 -1
View File
@@ -2,5 +2,5 @@
# frozen_string_literal: true
module Liquid
VERSION = "5.8.3"
VERSION = "5.8.4"
end