mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Merge pull request #1457 from Shopify/fix-unless-to-use-to-liquid-value-helper
fix unless to use to_liquid_value helper with multiple conditions
This commit is contained in:
@@ -21,8 +21,9 @@ module Liquid
|
|||||||
|
|
||||||
# After the first condition unless works just like if
|
# After the first condition unless works just like if
|
||||||
@blocks[1..-1].each do |block|
|
@blocks[1..-1].each do |block|
|
||||||
result = block.evaluate(context)
|
result = Liquid::Utils.to_liquid_value(
|
||||||
result = result.to_liquid_value if result.is_a?(Liquid::Drop)
|
block.evaluate(context)
|
||||||
|
)
|
||||||
|
|
||||||
if result
|
if result
|
||||||
return block.attachment.render_to_output_buffer(context, output)
|
return block.attachment.render_to_output_buffer(context, output)
|
||||||
|
|||||||
Reference in New Issue
Block a user