[StandardFilter] Fix missing @context on iterations

This commit is contained in:
Thierry Joyal
2022-03-07 09:17:07 -05:00
parent 10f8337209
commit 4af38bc549
3 changed files with 39 additions and 8 deletions
+2 -1
View File
@@ -582,8 +582,9 @@ module Liquid
def each
@input.each do |e|
e = e.respond_to?(:to_liquid) ? e.to_liquid : e
e.context = @context if e.respond_to?(:context=)
yield(e.respond_to?(:to_liquid) ? e.to_liquid : e)
yield(e)
end
end
end