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

[Bug] OR does not works with arrays in templates #592

Open
IAkumaI opened this issue Jan 11, 2021 · 0 comments
Open

[Bug] OR does not works with arrays in templates #592

IAkumaI opened this issue Jan 11, 2021 · 0 comments

Comments

@IAkumaI
Copy link
Contributor

IAkumaI commented Jan 11, 2021

if or statement in templates does not works when first argument is empty array and second is true (or truthy variable).

Derby version is 0.10.28. Not last, but 29 does not fix this as i see in releases.

model.set('some.list', []);
model.set('varTrue', true);
{{if some.list || true}}
Never reached
{{/if}}

{{if some.list || varTrue}}
Never reached
{{/if}}

{{if true || some.list}}
This works
{{/if}}

{{if varTrue || some.list}}
This works too
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant