Skip to content

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

@IAkumaI

Description

@IAkumaI

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}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions