Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Sep 25, 2019
1 parent 16f6880 commit 985add0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/components/object-inspector/property.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default Component.extend({
showDependentKeys: and('isDepsExpanded', 'hasDependentKeys'),

canCalculate: computed('model', 'isCalculated', 'isComputedProperty', function () {
if (this.get('isOverridden')) return false;
if (this.get('model.isGetter') && this.get('model.isExpensive')) {
return true;
}
Expand Down
5 changes: 3 additions & 2 deletions ember_debug/object-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ export default EmberObject.extend(PortMixin, {
objectMixins[0].properties = objectMixins[0].properties.concat(...objectMixins[1].properties).uniqBy('name');
objectMixins.splice(1, 1);
}
const index = objectMixins.findIndex(o => o.isEmberExtended);
let index = objectMixins.findIndex(o => o.isEmberExtended);
if (index < 0) index = objectMixins.length;
mixinDetails.push(...objectMixins.slice(0, index));

const objectName = mixinDetails[0].name;
Expand All @@ -521,7 +522,7 @@ export default EmberObject.extend(PortMixin, {

mixinDetails.push({ name: name.toString(), properties: propertiesForMixin(mixin), expand: mixin.expand });
});
mixinDetails.push(...objectMixins.slice(index+1));
mixinDetails.push(...objectMixins.slice(index+1, -1));

fixMandatorySetters(mixinDetails);
applyMixinOverrides(mixinDetails);
Expand Down

0 comments on commit 985add0

Please sign in to comment.