Empty model displays __!!__ as input values #196

Closed
basememara opened this Issue Dec 5, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@basememara

Creating a new User while passing in no data will create an empty User instance. You then pass this empty model instance into the view and because both id and name are undefined, live binding cannot resolve the values you're binding to. There seems to be a bug in CanJS when attr() is used to retrieve an undefined value.

Sample: http://jsfiddle.net/basememara/j9XSw/4/
Thread: https://forum.javascriptmvc.com/#Topic/32525000001083069

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Dec 5, 2012

Contributor

It looks as if it is that special case when using a callback. When doing it synchronously it works as expected:

http://jsfiddle.net/j9XSw/5/

So it is probably the fragment passed to the callback. We should probably get rid of callback and only use Deferreds but not for 1.1.x releases. Still investigating how to fix this best.

Contributor

daffl commented Dec 5, 2012

It looks as if it is that special case when using a callback. When doing it synchronously it works as expected:

http://jsfiddle.net/j9XSw/5/

So it is probably the fragment passed to the callback. We should probably get rid of callback and only use Deferreds but not for 1.1.x releases. Still investigating how to fix this best.

@daffl daffl closed this in f120881 Dec 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment