Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes Issue #16 #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@ var UnwatchedDir = broccoliSource.UnwatchedDir;
var Funnel = require('broccoli-funnel');
var MergeTrees = require('broccoli-merge-trees');

// For ember-cli < 2.7 findHost doesnt exist so we backport from that version for earlier version of ember-cli.
// https://github.com/ember-cli/ember-cli/blame/16e4492c9ebf3348eb0f31df17215810674dbdf6/lib/models/addon.js#L533
function findHostShim() {
var current = this;
var app;
do {
app = current.app || app;
} while (current.parent.parent && (current = current.parent))
return app;
}

module.exports = {
name: 'ember-cli-svgstore',

included: function () {
var findHost = this._findHost || findHostShim;
this.app = findHost.call(this);

this._super.included.apply(this, arguments);
},

options: function() {
return this._options = this._options || merge(true, {}, {
files: []
Expand Down