Closed amedve closed 4 months ago
Currently, lenientIf config option only applies to statements with a single operand. This is a different behavior from the Shopify (Ruby) liquid.
lenientIf
Current behavior (strictVariables and lenientIf are both set to true):
strictVariables
true
{% if nonexistent %}{% endif %}
{% if nonexistent == "value" %}one{% else %}two{% endif %}
Expected:
two
{% if nonexistent != "value" %}one{% else %}two{% endif %}
one
Currently,
lenientIf
config option only applies to statements with a single operand. This is a different behavior from the Shopify (Ruby) liquid.Current behavior (
strictVariables
andlenientIf
are both set totrue
):{% if nonexistent %}{% endif %}
works fine{% if nonexistent == "value" %}one{% else %}two{% endif %}
returns an errorExpected:
{% if nonexistent == "value" %}one{% else %}two{% endif %}
to returntwo
{% if nonexistent != "value" %}one{% else %}two{% endif %}
to returnone