MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / _findHost

Function _findHost

lib/models/addon.js:692–703  ·  view source on GitHub ↗

This method climbs up the hierarchy of addons up to the host application. This prevents previous addons (prior to `this.import`, ca 2.7.0) to break at importing assets when they are used nested in other addons. @private @method _findHost

()

Source from the content-addressed store, hash-verified

690 @method _findHost
691 */
692 _findHost() {
693 let current = this;
694 let app;
695
696 // Keep iterating upward until we don't have a grandparent.
697 // Has to do this grandparent check because at some point we hit the project.
698 do {
699 app = current.app || app;
700 } while (current.parent.parent && (current = current.parent));
701
702 return app;
703 },
704
705 /**
706 This method is called when the addon is included in a build. You

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…