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

Arrays with multiple tags of the same name don’t contain actual tag elements #2061

Closed
wmnnd opened this Issue Nov 4, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@wmnnd

wmnnd commented Nov 4, 2016

Hi there,

it appears that when you have multiple nested tags using the same name attribute (e. g. name="foo"), Riot creates an array under this.tags (e. g. this.tags.foo) that consists of objects containing the properites of the parent tag while missing properties and methods of the nested tag. This is probably related to #1697.

I have created an example here:
http://plnkr.co/edit/L3VXsdb6oxVl1c3WRoft?p=preview

Which version of Riot does it affect?
Current master from GitHub.

How would you tag this issue?

  • Bug

@rsbondi rsbondi added the bug label Nov 5, 2016

@rsbondi

This comment has been minimized.

Show comment
Hide comment
@rsbondi

rsbondi Nov 5, 2016

Member

This is specific to each and does not occur for multiple tags with same name that are non-looped

Member

rsbondi commented Nov 5, 2016

This is specific to each and does not occur for multiple tags with same name that are non-looped

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Nov 5, 2016

Member

This issue will disappear in riot@3.0.0 http://plnkr.co/edit/9u6en3y8znFNjDaS8ns7?p=preview using the ref directive.
I am not sure it's worth to fix it now in riot@2 it could be a potential breaking change. I will mark it as fixed.
For now @wmnnd you can use this workaround http://plnkr.co/edit/aYU6JbcAnSYfN1sqAbMp?p=preview avoiding to give a name to the looped elements

Member

GianlucaGuarini commented Nov 5, 2016

This issue will disappear in riot@3.0.0 http://plnkr.co/edit/9u6en3y8znFNjDaS8ns7?p=preview using the ref directive.
I am not sure it's worth to fix it now in riot@2 it could be a potential breaking change. I will mark it as fixed.
For now @wmnnd you can use this workaround http://plnkr.co/edit/aYU6JbcAnSYfN1sqAbMp?p=preview avoiding to give a name to the looped elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment