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

Moving an item between arrays gives error about content already being a part of the tree #125

Open
davisg123 opened this issue Feb 1, 2024 · 0 comments

Comments

@davisg123
Copy link

I hit an issue where moving an item to a new array is throwing an error

const item = store.arr1.splice(0, 1)[0]
store.arr2.push(item)  // throws error item is already part of tree

If we set the data and not the proxy it works, is that the expected way to set items on arrays?

const item = store.arr1.splice(0, 1)[0]
store.arr2.push(deepClone(item))  // works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant