@tim wrote:
Hi, we’re upgrading our ember app to 3.6.1 (from 3.5.1) as part of our roadmap to get back on the latest version of ember.
After the upgrade we started seeing an error “EmberObject.create no longer supports defining computed properties. Define computed properties using extend() or reopen() before calling create().”
What’s weird is that in this case the error is coming from a component invocation.
From the stack trace, the error is occurring in CurlyComponentManager.create when it tries to create a child component referenced in a parent component’s template:
{{loan-information/expanded/cell data=propertyType type='string' }}
The child component’s definition is very simple.
@tagName('td') @classNames('tm-TableFact-cell') export default class LoanInformationExpandedTableCellComponent extends Component {}
In the parent component, propertyType is defined as an alias to an ember data model property.
export default class LoanInformationSubjectPropertyComponent extends Component { subjectProperty: SubjectPropertyModel; @alias('subjectProperty.propertyType') propertyType; ...
The error is happening because the ‘data’ property being passed into the child component is failing the check:
true && !!(value instanceof _metal.ComputedProperty) && (0, _debug.assert)('EmberObject.create no longer supports defining computed ' + 'properties. Define computed properties using extend() or reopen() ' + 'before calling create().', !(value instanceof _metal.ComputedProperty));
The value of course comes from a computed property in the parent component, but it seems wrong that this check is failing when it’s passed in as a property to a child component in a template. What am I missing?
Posts: 2
Participants: 1