ember-script
ember-script copied to clipboard
dependency inference - missing some dependent properties
Cannot explain better than an example:
class Person
postsDisplay: ~>
@user.method @name
will give you:
Person = Ember.Object.extend({
postsDisplay: Ember.computed(function () {
return get$(this, 'user').method(get$(this, 'name'));
}).property('user')
});
As you can see the name
is not added in the dependencies of the computed property. Sounds like this happens when having the properties in parameters. Also:
class Person
postsDisplay: ~>
@method @name
would give:
Person = Ember.Object.extend({
postsDisplay: Ember.computed(function () {
return this.method(get$(this, 'name'));
}).property('')
});
Please make a fix for this :+1: Hmm... On closer thought, I think the ember-script compilation is correct behaviour??
Sorry to answer only now, I missed your message.
No, it should depend on this.user
and this.name
since they are both used. Also the second example, the method is most likely to return some different value in case this.name
is changed. And the method
might be a computed property too so it should be part of the dependent keys.