Skip to content

Strict mode shouldn't be enforced in conditionals #1063

@nevir

Description

@nevir

Currently:

let template = Handlebars.compile('{{#if foo}}{{foo}}{{/if}}', {strict: true});
template({}); // Throws `Error: "foo" not defined in [object Object]`

I definitely expected this to not be the case (you should be able to explicitly protect against missing values, IMO)!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions