File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Support old versions of Ember CLI.
2+ function findHost ( ) {
3+ var current = this ;
4+ var app ;
5+
6+ // Keep iterating upward until we don't have a grandparent.
7+ // Has to do this grandparent check because at some point we hit the project.
8+ // Stop at lazy engine boundaries.
9+ do {
10+ if ( current . lazyLoading === true ) { return current ; }
11+ app = current . app || app ;
12+ } while ( current . parent && current . parent . parent && ( current = current . parent ) ) ;
13+
14+ return app ;
15+ }
16+
117module . exports = {
218 name : 'ember-browserify' ,
319
@@ -12,11 +28,7 @@ module.exports = {
1228 newImportApi = true ;
1329 }
1430
15- // Stop-gap measure to support another addon
16- // consuming this addon. https://github.com/ef4/ember-browserify/issues/29
17- if ( typeof app . import !== 'function' && app . app ) {
18- app = app . app ;
19- }
31+ app = findHost . call ( this ) ;
2032
2133 var enableSourcemaps = app . options . sourcemaps && app . options . sourcemaps . enabled && app . options . sourcemaps . extensions . indexOf ( 'js' ) > - 1 ;
2234
You can’t perform that action at this time.
0 commit comments