Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] args lost when passed to {{component}} #1163

Conversation

rreckonerr
Copy link
Contributor

As reported by @samselikoff in emberjs/ember.js#19061,
arguments passed to {{component}} helper, except for the first one, are ignored.

Component

{{component "reproduce" one="first" two="second" three="third" four="fourth"}}

Resulted in

hash = [["@one", "two", "three"], ["first", "second", "third"]]

instead of

hash = [["@one", "@two", "@three"], ["first", "second", "third"]]

@rreckonerr rreckonerr force-pushed the fix/arguments-lost-when-passed-via-component-helper branch from 3131b5d to 4c7b70a Compare September 21, 2020 22:11
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
@rreckonerr rreckonerr force-pushed the fix/arguments-lost-when-passed-via-component-helper branch from 4c7b70a to b12e116 Compare September 21, 2020 22:30
Copy link
Member

@pzuraq pzuraq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you for digging in and solving this issue, we really appreciate it! This is a great PR also, tests look fantastic, everything is solid. Going to merge right away.

@rwjblue do you think we need to backport this for Ember LTS? I'm not sure if it impacted much existing code, but may make sense to.

@pzuraq pzuraq merged commit 20aaf30 into glimmerjs:master Sep 21, 2020
@rwjblue
Copy link
Member

rwjblue commented Sep 22, 2020

Ya, backporting seems totally fine/safe to me. In order to backport, we'd need PRs targeting the release-0-56 branch (for Ember 3.20 / 3.21) and the release-0-59 branch (for Ember 3.22 beta).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants