Skip to content

Commit

Permalink
Provide forward compatibility when accessing container (#38)
Browse files Browse the repository at this point in the history
Adding support for the latest ember testing API
  • Loading branch information
puwelous authored and jkusa committed Oct 28, 2018
1 parent 396f161 commit f3ea071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test-support/helpers/ember-cli-clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function fireComponentAction(context, selector, actionName) {
*/
function getComponentBySelector(context, selector='.copy-btn') {
let emberId = context.$(selector).attr('id');
return context.container.lookup('-view-registry:main')[emberId];
return (context.container || context.owner).lookup('-view-registry:main')[emberId];
}

/**
Expand Down

0 comments on commit f3ea071

Please sign in to comment.