harttle/liquidjs

Feature request: allow `lenientIf` for multiple operands

amedve opened this issue · 0 comments

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 and lenientIf are both set to true):

  • {% if nonexistent %}{% endif %} works fine
  • {% if nonexistent == "value" %}one{% else %}two{% endif %} returns an error

Expected:

  • {% if nonexistent == "value" %}one{% else %}two{% endif %} to return two
  • {% if nonexistent != "value" %}one{% else %}two{% endif %} to return one