SyncedStore icon indicating copy to clipboard operation
SyncedStore copied to clipboard

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

Open davisg123 opened this issue 1 year ago • 0 comments

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

davisg123 avatar Feb 01 '24 21:02 davisg123