Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] Ensure that
this._super
is called by Components.
When implementing `init` in a component subclass you must call `this._super(...arguments)`. If you do not you will get an error. Unfortunately, that error is **very** hard to understand and is completely unrelated to code that you have written. This change adds a small flag (via symbol to avoid exposing this publicly) that we can use to ensure that `_super` was called properly. --- After these changes, given the following: ```javascript import Ember from 'ember'; export default Ember.Component.extend({ init() { this.doThings(); } }); ``` Will throw an error that explains that you must call `_super`: ``` You must call `this._super(...arguments);` when implementing `init` in a component. Please update ${this} to call `this._super` from `init`. ```
- Loading branch information