Given a object such as Person which has an optional child object such as IdentityDetails (1:0/1) I cant get this to work properly. I just dont want to show the template if identitysection is null. Even when hasIdentitySection returns false this produces an exception because it tries to evaluate identitySection which is null <div data-bind="visible: hasIdentitySection"> <div data-bind="source: identitySection" data-template="identity-template"></div> </div>
Please report this potential bug via the kendo UI forums or by creating a ticket in your account.
So the solution, is to simply treat null as [], this makes handling non-array values with data-template almost pleasant. Cant see any side effects to adding this fix to core
I guess one can workaround it by having source: getIdentitySection which basically does this.get("identitySection") || [] but it kinda sucks