handlebars.js icon indicating copy to clipboard operation
handlebars.js copied to clipboard

Strict mode errors on unless block with nested property

Open GriffinSauce opened this issue 8 years ago • 1 comments

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.

GriffinSauce avatar Nov 27 '15 09:11 GriffinSauce