Skip to content
New issue

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

Cannot .push() to a reactive Array that is wrapped in a Proxy #9742

Closed
jsormaz opened this issue Dec 3, 2023 · 0 comments
Closed

Cannot .push() to a reactive Array that is wrapped in a Proxy #9742

jsormaz opened this issue Dec 3, 2023 · 0 comments
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working scope: reactivity

Comments

@jsormaz
Copy link

jsormaz commented Dec 3, 2023

Vue version

3.3.9

Link to minimal reproduction

https://play.vuejs.org/#eNp9UktPwzAM/itWLgxp6gTcxkOCiQMcYAJuhENVTBdIkyhxtqGq/x0nZSvP3RJ/D3+O04pz54plRDEVJ6HyyhEEpOjOpFGNs56gBY9lRWqJ0MGLtw3sMX/vWBppJhOYMUoI5cAqvS/fpamsCQTWq1qZUp+nIpxuWaPHp/1fFnNv1++st9E8Ay3wH0+XaBtDg6teN/rWagxtt20wj2GhTA2osUFDAchm+02/7D24Fo75o4Mk/1k87D1TDqux0LYeDZT9Y+Bmt5FcpCk8Hozh8Emak0n/rvyifCFsnOZp+TZbYPUGF96uAnqY9ZafcmnadjDuuqydfBGLsaDAMV5UXbwGa3h/rTQAUlS2cUqjv3Wk2FOKKWQkYaXWdnWda+Qjjjf1KkX5o/4a1qkmxdwjh1yiFFuMSl8j9fDl/Q2u+bwFG/scNbN3gHfI88aUsadd8NI59hdeTnuVfyFv7yFcrglN2AyVgiZml/lS8Kec7Rh9iHtUHGWdNJ3oPgATiAqt

Steps to reproduce

Wrapping a reactive in a Proxy (to allow for customizing traps etc.) generally works, however if I wrap an array and then try to .push onto the array, I get a maximum call stack error.

The reproduction has just a basic Proxy with an empty handler for demonstration purposes, in actual use, the handler would have some traps defined.

What is expected?

able to push to array

What is actually happening?

Maximum Call Stack Error

System Info

No response

Any additional comments?

No response

@LinusBorg LinusBorg added 🐞 bug Something isn't working scope: reactivity labels Dec 3, 2023
@github-project-automation github-project-automation bot moved this to Needs Review in Issue / PR Management Dec 4, 2023
@pikax pikax added the has PR A pull request has already been submitted to solve the issue label Dec 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working scope: reactivity
Projects
None yet
3 participants