Skip to content

Commit

Permalink
Merge pull request #13850 from chadhietala/fix-action-scope
Browse files Browse the repository at this point in the history
[Glimmer2] Fix action target in a block
  • Loading branch information
rwjblue authored Jul 20, 2016
2 parents 5757ea5 + f718cdb commit cbe74dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ moduleFor('Helpers test: element action', class extends RenderingTest {
this.assert.equal(event.isDefaultPrevented(), true, 'should preventDefault');
}

['@htmlbars it should target the proper component when `action` is in yielded block [GH #12409]']() {
['@test it should target the proper component when `action` is in yielded block [GH #12409]']() {
let outerActionCalled = false;
let innerClickCalled = false;

Expand Down
4 changes: 3 additions & 1 deletion packages/ember-views/lib/mixins/action_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ export default Mixin.create({
if (!shouldBubble) { return; }
}

if (target = get(this, 'target')) {
target = get(this, 'target') || get(this, '_targetObject');

if (target) {
assert(
'The `target` for ' + this + ' (' + target +
') does not have a `send` method',
Expand Down

0 comments on commit cbe74dd

Please sign in to comment.