When overriding the init
lifecycle hook inside Ember Components, Controllers, Routes or Mixins, it is necessary to include a call to _super
.
// BAD
export default Ember.Component.extend({
init() {
this.set('items', []);
},
});
// GOOD
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.set('items', []);
},
});