Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: allow lenientIf for multiple operands #682

Closed
amedve opened this issue Apr 17, 2024 · 0 comments · Fixed by #683
Closed

Feature request: allow lenientIf for multiple operands #682

amedve opened this issue Apr 17, 2024 · 0 comments · Fixed by #683
Labels

Comments

@amedve
Copy link
Contributor

amedve commented Apr 17, 2024

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
@harttle harttle added the bug label Apr 21, 2024
harttle pushed a commit that referenced this issue Apr 21, 2024
* allow `lenientIf` for multiple operands

* update tests
github-actions bot pushed a commit that referenced this issue Apr 21, 2024
## [10.11.1](v10.11.0...v10.11.1) (2024-04-21)

### Bug Fixes

* allow %Z for TimezoneDate, update docs accordingly [#684](#684) ([e09657c](e09657c))
* Allow `lenientIf` for multiple operands (issue [#682](#682)) ([#683](#683)) ([490ff43](490ff43))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants