Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Mustache helper has no rendered output, if the output is 0. #1109
When writing an inline Mustache helper, if the result from the helper is the number zero, then it won't be rendered.
See example: http://jsfiddle.net/qYdwR/1601/
Context: I'm trying to write a helper for conveniently handling numerical values, rounding them to the nearest whole number, and displaying null values in a consistent way.
pushed a commit
Oct 2, 2015
This also exists in stache due to: https://github.com/bitovi/canjs/blob/minor/view/stache/expression.js#L329
Adding a test and leaving open while I verify if we should be checking for all falsey values, or just undefined.