Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stephangiesen opened this issue May 8, 2015 · 1 comment
Closed

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

stephangiesen opened this issue May 8, 2015 · 1 comment
Labels
Milestone

Comments

@stephangiesen
Copy link

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

@kpdecker kpdecker added the bug label May 18, 2015
@kpdecker kpdecker added this to the Next milestone May 18, 2015
@kpdecker
Copy link
Collaborator

Thanks for the report. Will have this fixed by the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants