Open Ericlm opened 1 week ago
3.5.12
https://github.com/Ericlm/vue-for-of
@click="() => {}"
Using a for loop (which could be for-of, for, or forEach) should not make any item "disappear" for the original array.
The for loop looks empty, or filled with undefined. For example, with an array of 5 numbers, it can print 5 undefined.
undefined
System: OS: macOS 15.0.1 CPU: (8) arm64 Apple M1 Memory: 88.38 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.6.0 - ~/.asdf/installs/nodejs/22.6.0/bin/node npm: 10.8.3 - ~/.asdf/plugins/nodejs/shims/npm pnpm: 9.9.0 - ~/.asdf/installs/nodejs/22.6.0/bin/pnpm Browsers: Chrome: 129.0.6668.103 Safari: 18.0.1 npmPackages: vue: ^3.5.12 => 3.5.12
⚠️ It does not occur 100% of the time, but it seems to occur each time the server starts. Sometimes, on HMR, it suddenly works perfectly.
a workaround see Playground
Vue version
3.5.12
Link to minimal reproduction
https://github.com/Ericlm/vue-for-of
Steps to reproduce
@click="() => {}"
)What is expected?
Using a for loop (which could be for-of, for, or forEach) should not make any item "disappear" for the original array.
What is actually happening?
The for loop looks empty, or filled with
undefined
. For example, with an array of 5 numbers, it can print 5undefined
.System Info
Any additional comments?
⚠️ It does not occur 100% of the time, but it seems to occur each time the server starts. Sometimes, on HMR, it suddenly works perfectly.