Skip to content

Commit

Permalink
Make attr.actionFn work
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala committed Sep 29, 2016
1 parent be430bd commit 86276f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/ember-glimmer/lib/utils/process-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class SimpleArgs {
let ref = namedArgs.get(name);
let value = attrs[name];

if (ref[UPDATE]) {
if (typeof value === 'function') {
attrs[name] = value;
} else if (ref[UPDATE]) {
attrs[name] = new MutableCell(ref, value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ moduleFor('Helpers test: closure {{action}}', class extends RenderingTest {
this.render('{{outer-component}}');

this.runTask(() => {
innerComponent.fireAction();
actualReturnedValue = innerComponent.fireAction();
});

this.assert.equal(actualFirst, first, 'first argument is correct');
Expand Down

0 comments on commit 86276f9

Please sign in to comment.