Closed
Description
Vue version
3.5
Link to minimal reproduction
Steps to reproduce
Playground with v3.4
Playground with v3.5
Open playground links and see Console
What is expected?
log a b c d
in v3.5
What is actually happening?
log
(item, index) {
return fn.call(this, toReactive(item), index, self);
} 'b' undefined undefined
with this PR, it logs
'a' 'b' undefined undefined
System Info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 131.72 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - /usr/local/bin/node
npm: 10.8.1 - /usr/local/bin/npm
pnpm: 9.6.0 - /usr/local/bin/pnpm
bun: 1.0.0 - /usr/local/bin/bun
Browsers:
Chrome: 127.0.6533.100
Safari: 17.5
Any additional comments?
The proxy find
method passes only two parameters. see
core/packages/reactivity/src/arrayInstrumentations.ts
Lines 60 to 65 in a593dde
related PR #9511
Note:
- if we modify the
find
method signature to add...args
, it will be inconsistent with the native arrayfind
method signature - like
every
,filter
,findIndex
,findLast
,findLastIndex
,forEach
,map
, andsome
also have the same issue