Skip to content

Commit

Permalink
Fix @Args swapped with this.args (#40)
Browse files Browse the repository at this point in the history
* Add failing test

* Resolve #35
  • Loading branch information
NullVoxPopuli authored Oct 26, 2019
1 parent e3e4c1c commit 5f6ae02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{my-component "string"}}
{{my-component 1}}
{{my-component foo}}
{{my-component @foo}}
{{my-component property}}
{{my-component (my-helper property)}}
{{my-component (my-helper "string")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{my-component "string"}}
{{my-component 1}}
{{my-component this.foo}}
{{my-component @foo}}
{{my-component this.property}}
{{my-component (my-helper this.property)}}
{{my-component (my-helper "string")}}
Expand Down
2 changes: 2 additions & 0 deletions transforms/no-implicit-this/helpers/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function transformPlugin(env, runtimeData, options = {}) {
Program: paramTracker,
ElementNode: paramTracker,
PathExpression(ast) {
if (ast.data) return;

let token = ast.parts[0];

if (token !== 'this') {
Expand Down

0 comments on commit 5f6ae02

Please sign in to comment.