We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<script setup> import { reactive } from 'vue' const state = reactive({ list: [1, 2, 3] }) const {log} = console </script> <template> <h1>{{ msg }}</h1> <button @click="() => { for (const x of state.list) { log(x) // output: undefined } }">Click</button> </template>
workaround:
<button @click="() => { let x for (x of state.list) { log(x) //output: 1, 2, 3 } }">Click</button>
SFC Playground
Originally posted by @JetLua in #7237
The text was updated successfully, but these errors were encountered:
for
undefined
fix(compiler-core): avoid rewriting scope variables in inline for loo…
a2d810e
…ps (#7245) close #7238
Successfully merging a pull request may close this issue.
workaround:
SFC Playground
Originally posted by @JetLua in #7237
The text was updated successfully, but these errors were encountered: