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

Cannot read properties of can.Map inside a property's value method #1284

Closed
akagomez opened this issue Oct 23, 2014 · 0 comments · Fixed by #1286
Closed

Cannot read properties of can.Map inside a property's value method #1284

akagomez opened this issue Oct 23, 2014 · 0 comments · Fixed by #1286
Assignees
Labels
Milestone

Comments

@akagomez
Copy link
Contributor

can.Map.extend({
  numbers: [1, 2, 3, 4, 5, 6],
  define: {
    firstNumber: {
      value: function () {
        // This will throw an error
        return this.attr('numbers').slice(0, 1);
      }
    }
  }
});

JSFiddle

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

Successfully merging a pull request may close this issue.

2 participants