Closed as duplicate of#12615
Description
Vue version
v3.5.17 (also v3.4.38 and 5f8314c)
Link to minimal reproduction
Steps to reproduce
- Create a reactive map (
reactive(new Map())
) - Call a method on the map that returns an iterator (
map.entries()
) - Call a helper method on this iterator, e.g.
map.entries().filter()
(as defined in https://github.com/tc39/proposal-iterator-helpers, now stable and supported by all major browsers).
Workaround: call Iterator.from(map.entries()).filter()
What is expected?
The method should work, just like if the map had not been reactive.
What is actually happening?
The method is not defined.
System Info
Tested the playground link in Firefox 139.0.4 and Chrome 137.0.7151.104 on macOS 15.5.
Any additional comments?
The fix should be fairly simple: if Iterator.from
is defined, Vue should call Iterator.from
on the object it would otherwise return from any methods it defines returning an iterator, e.g. map.entries
, set.values
.
Metadata
Metadata
Assignees
Labels
No labels