automerge / automerge-classic

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
http://automerge.org/
MIT License
14.76k stars 467 forks source link

Clone issue fix where changesEncoders were not getting copied to cloned object #476

Closed anshuljhawar closed 2 years ago

anshuljhawar commented 2 years ago

changesEncoders were not getting copied to the cloned object. This resulted in losing the in-memory information/state of the changesEncoders for the cloned object.

Deep-cloning is required so that the whole map object is copied properly.

ept commented 2 years ago

Hi @anshuljhawar, thanks, this seems like an important fix. However, I would prefer not to add any dependencies on other packages if they can be avoided. Could we do the cloning without lodash?