Skip to content

Commit 7ac0ec9

Browse files
Stephen McLeanachambers
authored andcommitted
Fix how vendored assets are imported
this.app is only available for addons who are a direct dependency of the consuming app. In the case where the addon is a dependency of another addon, this.app is not defined. However, the included function is passed a "parent" which is either the consuming app or the parent addon. Seeing as we use ember-colpick as a dependency of an addon which is itself a dependency of the app, we need this.app fails and we need to use app instead.
1 parent aa3df05 commit 7ac0ec9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ module.exports = {
1717
blueprintsPath: function () {
1818
return path.join(__dirname, 'blueprints');
1919
},
20-
included: function colpick_included() {
20+
included: function colpick_included(app) {
2121
this._super.included.apply(this, arguments);
2222
if (!process.env.EMBER_CLI_FASTBOOT) {
2323
var colpickPath = path.join('vendor', 'jquery-colpick');
2424

25-
this.app.import(path.join(colpickPath, 'colpick.js'));
26-
this.app.import(path.join(colpickPath, 'colpick.css'));
25+
app.import(path.join(colpickPath, 'colpick.js'));
26+
app.import(path.join(colpickPath, 'colpick.css'));
2727
}
2828
},
2929
};

0 commit comments

Comments
 (0)