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

includeZero flag is missing #240

Closed
mraof opened this issue Oct 17, 2018 · 1 comment
Closed

includeZero flag is missing #240

mraof opened this issue Oct 17, 2018 · 1 comment
Assignees
Labels

Comments

@mraof
Copy link

mraof commented Oct 17, 2018

This code

{{#if previous includeZero=true}}

should treat previous as true when previous is Some(0) because of the includeZero flag.
The way around this currently is to use an Option<String> instead of an Option<i32>

handlebars-lang/handlebars.js#608 Relevant handlebars.js issue

@sunng87
Copy link
Owner

sunng87 commented Oct 17, 2018

Thanks! Didn't know the option on if helper, this will be supported soon.

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