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

length filter does't work as expected on empty array #462

Closed
ericmorand opened this issue Nov 8, 2019 · 0 comments
Closed

length filter does't work as expected on empty array #462

ericmorand opened this issue Nov 8, 2019 · 0 comments
Labels
Milestone

Comments

@ericmorand
Copy link
Member

ericmorand commented Nov 8, 2019

Consider the following template:

{% set arr = [] %}
{{ arr|length }}

It renders 12 instead of 0:

https://twigfiddle.com/ufu2il

@ericmorand ericmorand added the bug label Nov 8, 2019
@ericmorand ericmorand added this to the 3.1.2 milestone Nov 8, 2019
ericmorand added a commit to ericmorand/twing that referenced this issue Nov 11, 2019
ericmorand added a commit that referenced this issue Nov 11, 2019
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

1 participant