Closed kpdecker closed 9 years ago
Currently the build fails because handlebars@3 seems to skip keys with undefined values inside objects when using #each, since you maintain handlebars would you know why ?
Handlebars 3 should output keys with undefined values from each
. Under 4 this changed as it causes breakages downstream if you allow that... Although perhaps it's better to fix the root issue by continuing to iterate over undefined values and forcing a fake context when executing helpers.
https://github.com/wycats/handlebars.js/issues/1093
https://github.com/wycats/handlebars.js/issues/1065
Could you chime in on the open issue on handlebars pointing to the template that is failing and an example of the data that it is failing with?
My bad that was on 4 you're right.
Removing defaults might be ok here but on strings for example, if you don't know empty strings are denied it's giving you false assumptions.
Well I have nothing to add to those issues, null or undefined gives the same behavior so I'm in https://github.com/wycats/handlebars.js/issues/1093 case.
Posting the data that is failing will help me understand and document the use case. Seemingly minor changes like this cause problems in Handlebars a lot and being able to point to reasons for the decisions is beneficial for future reference as well as helping me to decide which of the not completely pleasant options are best :)
Thought about it a bit, Infinity cannot even be stringified, so it makes no sense for an API to tell that. Did you give a try to the small change I made for design see if it fits your needs ?
Published the new version, you can upgrade or try yourself on the live demo.
Screen shot under chrome using the default styles:
Validated with:
Two concerns here: