YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.

Home Page:https://syncedstore.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

davisg123 opened this issue · 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