Loop variable defined in `for` loop in template becomes `undefined`
Vue version
3.3.4
Link to minimal reproduction
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
duplicate of https://github.com/vuejs/core/issues/7238