mbest/knockout.punches

'Default' filter does not evaluate properly for functions

Closed this issue · 2 comments

Expected behavior:
When a function is specified for a binding, execute the function. If the value returned is null or an empty string, replace the value with the Default Value.

Actual Behavior:
When a function is specified for a binding, the function is returned and the Default Value is ignored.

Ignore the above commit. I'm fixing it a different way.

This would mean that the default filter works differently from other filters. The only reason the function check is in the code now is so that functions don't get confused with arrays (since both have a length) property.