Skip to content

Strict mode errors on unless block with nested property #1138

@GriffinSauce

Description

@GriffinSauce

When strict: true is added Handlebars errors on the use of a missing nested property in an unless block helper.

var myObject = {};
{{#unless myObject}}

{{/unless}}
-> no error

{{#unless myObject.prop.prop}}

{{/unless}}
-> error "prop doesn't exist"

As described in this issue strict mode shouldn't be enforced on helpers and conditional block. The point of a conditional block is to handle (non-)existence of properties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions