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

scope objects with constructor function properties are treated as methods #1261

Closed
justinbmeyer opened this issue Oct 7, 2014 · 3 comments · Fixed by #1319
Closed

scope objects with constructor function properties are treated as methods #1261

justinbmeyer opened this issue Oct 7, 2014 · 3 comments · Fixed by #1319
Milestone

Comments

@justinbmeyer
Copy link
Contributor

A scope object with a constructor function like:

scope: {
  Todo: Todo
}

Todo is not treated as a property, instead as a method, which makes it unbindable in "events":

Example:

http://jsfiddle.net/c3bfy/146/

@justinbmeyer
Copy link
Contributor Author

The fix is to make can.Map treat can.Constructs on the prototype as defaults instead of methods.

@justinbmeyer
Copy link
Contributor Author

This behavior happens around here: https://github.com/bitovi/canjs/blob/master/map/map.js#L62

@ramblinjan
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants