Skip to content

Implicit parameters in {{#each}} introduces a peculiarity in helpers calling convention  #773

@Bertrand

Description

@Bertrand

Hello,

While porting 2.0 features to the objective-C version of handlebars, I came across a peculiarity introduced while trying to solve issue #671.

Since calling {{#each}} with no parameter was crashing the lib, you chose to accept {{#each}} as a valid syntax equivalent to {{#each .}}

I've ported this to handlebars-objc but I would like you to consider removing this from the 2.0 release while it's still in alpha phase.

each is the only built-in helper supporting this feature. I fear that a user stumbling upon {{#each}} would at least expect {{#if}} and {{#unless}} to also work.

Since the actual issue reported in #671 was a crash, don't you think it'd be wise reporting a better error rather than introduce such a peculiarity?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions