Skip to content

The each-helper ignores the Empty-String property #1021

@stephangiesen

Description

@stephangiesen

Hello,
thank you for this nice tool, it helped us a lot.

I'm stumbled on a problem with the each-helper.

It ignores the Empty-String property. When you iterate thru an object like this

{
 "": "Please Select" , 
 "adult": "Adult", 
 "teenager": "Adolescents aged 13 - 18 years", 
 "child": "Children under 12 years"
}

The first option with the empty string as key will be ignored.
To fix this I changed in handlebars.runtime-v3.0.3.js the two lines 325 and 332 from

if (priorKey) {

to

if (priorKey !== undefined) {

So it works fine for me.

Nice regards
Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions