diff --git a/core-object.js b/core-object.js index 365b242..5ec57d3 100644 --- a/core-object.js +++ b/core-object.js @@ -40,20 +40,18 @@ CoreObject.extend = function(options) { if (options) { if (shouldCallSuper(options.init)) { + // this._super.init && is to make sure that the deprecation message + // works for people who are writing addons supporting before 2.6. + deprecation( + 'The addon `' + options.name + '` is overriding init without calling this._super. ' + + 'This behaviour is deprecated. ' + + 'This means that addon\'s author needs to update it calling `this._super.init && this._super.init.apply(this, arguments)` ' + + 'and release a new version. ' + + 'Do not worry, ember-cli is working normally.' + ); if (hasArgs(options.init)) { - deprecation( - 'Overriding init without calling this._super is deprecated. ' + - 'Please call this._super(), addon: `' + options.name + '`' - ); options.init = forceSuperWithoutApply(options.init); } else { - - // this._super.init && is to make sure that the deprecation message - // works for people who are writing addons supporting before 2.6. - deprecation( - 'Overriding init without calling this._super is deprecated. ' + - 'Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `' + options.name + '`' - ); options.init = forceSuper(options.init); } }