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

Add support for use in nested addons #10

Merged
merged 1 commit into from
Jun 14, 2016

Conversation

samchrisinger
Copy link
Contributor

Purpose

I was getting an error when trying to use ember-toastr as a nested addon:

⏚ ⌂69% [Sam:~/Documents/workspace/ember-osf] feature/node-mixin+(+37/-173)+* 131 ± ember s
target.import is not a function
TypeError: target.import is not a function
    at Class.module.exports.included (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-toastr/index.js:11:18)
    at /Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/models/addon.js:244:32
    at Array.map (native)
    at Class.eachAddonInvoke (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/models/addon.js:242:22)
    at Class.Addon.included (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/models/addon.js:349:8)
    at EmberAddon.<anonymous> (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/broccoli/ember-app.js:433:15)
    at Array.filter (native)
    at EmberAddon.EmberApp._notifyAddonIncluded (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/broccoli/ember-app.js:428:45)
    at EmberAddon.EmberApp [as appConstructor] (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/broccoli/ember-app.js:109:8)
    at new EmberAddon (/Users/Sam/Documents/workspace/ember-osf/node_modules/ember-cli/lib/broccoli/ember-addon.js:38:8)

And made my change based on some reading around and debugger sessions. I've tested this behavior in an addon and in a regular app. All seems OK.

h/t ember-cli/ember-cli#3718 (comment)

@knownasilya
Copy link
Owner

Ah, thanks. I forgot to add that piece..

@knownasilya knownasilya merged commit e5c7873 into knownasilya:master Jun 14, 2016
knownasilya pushed a commit that referenced this pull request Jun 14, 2016
- Fix nested support, see #10
@knownasilya
Copy link
Owner

Published as 1.4.1

@samchrisinger
Copy link
Contributor Author

👍 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants