Closed peter-schwier closed 12 years ago
Thanks for reporting. Will fix.
The problem was introduced by a recent refactoring. I added couple of tests to ensure it won't happen in the future.
https://github.com/leonidas/transparency/blob/master/spec/basics.spec.coffee#L205 https://github.com/leonidas/transparency/blob/master/spec/directives.spec.coffee#L205
I can understand not filling in anything when the field is null. However, you should fill in something when the value is a number. Possibly when it is a boolean as well.
Currently it checks for truthy values. That excludes the values: 0, 0.0, and false. I would like to be able to render 0 in my templates without having to either (0).toString() or provide a directive as {number:{text:function(){return this.number.toString();}}}.
Please see the jsFiddle below. If you remove the directive from the render call then the values are not filled in. http://jsfiddle.net/Caementum/UtDH6/