Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

basememara opened this issue Dec 5, 2012 · 1 comment
Labels

Comments

@basememara
Copy link

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
Copy link
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 as completed in f120881 Dec 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants