Skip to content

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

@davidelias

Description

@davidelias

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions