ember-inspector
ember-inspector copied to clipboard
Calculating property in "All" view
Passing this to the model doesn't work when calculating a property.
https://github.com/emberjs/ember-inspector/blob/master/app/templates/components/mixin-details.hbs#L55
Reproduce:
-
Select "All" view

-
Find a CP that needs computing:

-
:boom:
Assigning to myself since I wrote it :-|
@nummi do you have an example app you are trying this with? There have been lots of other changes, so not sure if model=this is the problem or something else.
I discovered this poking around on the Apple Music beta site. Pretty sure this is incorrect because this is the mixin-detail component.
let mixinIndex = this.get('mixinDetails.model.mixins').indexOf(this.model);
this.model is not part of mixinDetails.model.mixins so mixinIndex is -1.
@nummi gotcha, I just know a lot has changed in a bunch of areas, so wasn't sure if this was the culprit.
Pretty sure the above line is the culprit. It’s a year old 🤢
Do we have tests for this?
I don’t think so. Not sure how to get a property in the “not computed” state.