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

{% break %} inside for loop stops template execution #783

Open
davidelias opened this issue Jan 2, 2025 · 2 comments
Open

{% break %} inside for loop stops template execution #783

davidelias opened this issue Jan 2, 2025 · 2 comments
Labels

Comments

@davidelias
Copy link

Hi there 👋

With version 10.19.1 {% break %} stops the template execution instead of just the for loop.

Example:

{% for i in (1..5) -%}
  {%- if i == 4 -%}
    {% break %}
  {%- else -%}
    {{ i }}
  {%- endif -%}
{%- endfor %}
after

Result with liquidjs:

1
2
3

Result with liquid:

1
2
3

after
@harttle harttle added the bug label Jan 2, 2025
github-actions bot pushed a commit that referenced this issue Jan 4, 2025
## [10.20.1](v10.20.0...v10.20.1) (2025-01-04)

### Bug Fixes

* break/continue stops whole template, [#783](#783) ([5f1a4cf](5f1a4cf))
* enumerate plain objects in where/where_exp, [#785](#785) ([#788](#788)) ([25ef104](25ef104))
* preserveTimezones support for RFC2822 date, [#784](#784) ([59cf3c0](59cf3c0))
@harttle
Copy link
Owner

harttle commented Jan 5, 2025

Please try 10.20.1, let me know if there's still any issue.

@davidelias
Copy link
Author

Please try 10.20.1, let me know if there's still any issue.

It fixed the issue, thanks! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants