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

tag-less component with bound id attribute throwing an error #14369

Closed
ctusch opened this issue Sep 28, 2016 · 6 comments
Closed

tag-less component with bound id attribute throwing an error #14369

ctusch opened this issue Sep 28, 2016 · 6 comments
Labels

Comments

@ctusch
Copy link

ctusch commented Sep 28, 2016

I ran into this issue while updating our application from Ember 2.4.2 to 2.8.0. Suddenly our subroutes wouldn't render anymore. Turns out that while you can assign an id to a tag-less component, the id's value must be a constant. Unfortunately in our applicaton the id is bound to a property.

There is a related issue (and PR) by @rwjblue that fixed this behavior for constant values: #14105

Here is a twiddle for easy reproduction. The error text reads:

ember.debug.js:6778 Uncaught Error: Assertion Failed: You cannot use elementId on a tag-less component: <twiddle@component:my-component::ember354>

The assertion can be found here.

@ctusch ctusch changed the title tag-less component with bound id property throwing an error tag-less component with bound id attribute throwing an error Sep 28, 2016
@HeroicEric
Copy link
Sponsor Member

HeroicEric commented Sep 28, 2016

just wanted to add that this seems to be fixed in beta and canary, maybe by #14363?

@ctusch
Copy link
Author

ctusch commented Sep 28, 2016

Interesting, looking at the callstack and searching the sources the whole infrastructure changed. Does this have something to do with Glimmer 2?

@chancancode
Copy link
Member

@HeroicEric as I mentioned yesterday, we should probably have a separate test for this scenario (id is used as a regular bound property, but not passed down to a child's elementId). Do you have time to tackle that? 😄

@Serabe Serabe added the Bug label Sep 28, 2016
@HeroicEric
Copy link
Sponsor Member

@chancancode I think I missed the conversation you're referring to but I can look into it 😄

@pixelhandler
Copy link
Contributor

@HeroicEric should this be closed as #14382 was merged?

@rwjblue
Copy link
Member

rwjblue commented Oct 2, 2016

Yeah, closing this (as fixed in release branch).

@rwjblue rwjblue closed this as completed Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants