Skip to content

Commit

Permalink
[BUGFIX] args lost when passed to {{component}}
Browse files Browse the repository at this point in the history
Because iterator was not working as expected.
 `@` character was not applied to all of the @arg names in hash array,
 except for the first argument. It resulted in
 `[["@firstArg", "secondArg"], ["valOne", "valTwo"]]`, instead of
 `[["@firstArg", "@secondArg"], ["valOne", "valTwo"]]`

 Fixes emberjs/ember.js#19061
  • Loading branch information
rreckonerr committed Sep 21, 2020
1 parent 520fb6f commit 4c7b70a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export function StaticComponentHelper(

if (compilable) {
if (hash) {
for (let i = 0; i < hash.length; i = i + 2) {
hash[i][0] = `@${hash[i][0]}`;
for (let i = 0; i < hash[0].length; i = i + 1) {
hash[0][i] = `@${hash[0][i]}`;
}
}

Expand Down

0 comments on commit 4c7b70a

Please sign in to comment.