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

Property doesn't have access to synced dependencies. #12161

Closed
QuantumKing opened this issue Aug 20, 2015 · 4 comments
Closed

Property doesn't have access to synced dependencies. #12161

QuantumKing opened this issue Aug 20, 2015 · 4 comments

Comments

@QuantumKing
Copy link

I have some code (Ember 2.0.0):

  assignedBundles: Ember.computed.readOnly('controllers.patient.assignedBundles'),

  allAssessments: Ember.computed.readOnly('controllers.application.allAssessments'),

  otherAssessments: function() {
    var bundle_assessments = this.get('assignedBundles').mapBy('assessment');
    return this.get('allAssessments').reject(function(assessment) {
      return bundle_assessments.contains(assessment.get('id'));
    }, this);
  }.property('allAssessments.[]', 'assignedBundles.[]'),

But I get the error Cannot read property 'mapBy' of undefined. I check afterwards in the Ember inspector and assignedBundles is correctly an array, so something is up where otherAssessments seems to be computed before assignedBundles. Has anyone else seen this?

@stefanpenner
Copy link
Member

are prototype extensions enabled or disabled?

@QuantumKing
Copy link
Author

@stefanpenner Where would I find that?

@QuantumKing
Copy link
Author

I think this has to do with needs not working as it used to. Whenever I do needs: ['someController'], I get nothing in Ember.computed.readOnly('controllers.someController.someProperty')

@QuantumKing
Copy link
Author

Ok, I found the commit from the changelog. It was needs #11770

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

No branches or pull requests

2 participants