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

Loop variable defined in for loop in template becomes undefined #8777

Closed
silane opened this issue Jul 13, 2023 · 1 comment
Closed

Loop variable defined in for loop in template becomes undefined #8777

silane opened this issue Jul 13, 2023 · 1 comment

Comments

@silane
Copy link

silane commented Jul 13, 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNqNUsFu2zAM/RVBGOAUSOxDd8qSIOvQw3bYhm23aQfHphO3tiRQdOKi8L+PkhLPy4aiJ4nkI9/jk57le2vTYwdyKVeuwNrSRum6tQZJPAuESgyiQtOKhEHJO6WVhj5US6jyrmGU0kI4oM7ObmIgRGG0I5Ej5k9i7afMfiaVMclcJLsck183PMjjqk4XVBst3MGcZv3YL0TeABJnzsAhHsg0qFlYGD0PbWIImGGutL+tsnENDgha2+QEHK12HRFT0ZOFtZIxUlJsi6YuHjnzBo6gSaw3UcV5B9YfyAJJkJl7UT6qDM4iqhemirBxhfNGURtLU3JzFyhXWaT2krKJPjmX5HhcVe/TB2c0v0gYpWRhWluzH1+s98opubyQKJk3jTl9CjnCDtiEmC8OUDz+J//gep9T8iuCAzyCkmONctwDxfL998/Q830stqbsGka/UPwGzjSd1xhhd50uWfYEF9R+DL+r1vsf7r4n0O6ylBd6eUqP5h/34YXV/8i9TW8vNrOL8fcu2txe+RgLfw9hjij2QGTdMsuKUnNbCU19xFQDZdq22ZZhGXaa6hYWpWm3zJi+zcra0TSdgmsXOzQndpaHTBb3/cFuXCDoEtDb8jraq7Yp9VXpH/rRlOE31PdOXQ==

Steps to reproduce

Open reproduction link and click the button.

What is expected?

Alerts should display foo,bar, foo and bar in sequence.

What is actually happening?

Alerts display foo,bar, undefined and undefined in sequence, which means the loop variable x becomes undefined while the normal variable a is fine.

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

duplicate of #7238

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants