loro-dev / loro

Reimagine state management with CRDTs. Make your app collaborative effortlessly.
https://loro.dev
MIT License
4.14k stars 77 forks source link

fix: delete the **bring back** tree node from the undo container remap #423

Closed Leeeon233 closed 2 months ago

Leeeon233 commented 2 months ago

When performing undo and redo operations for a tree node deletion, a new TreeID is used due to the associated Data MapContainer.

However, concurrent operations might bring back the deleted node while keeping its original TreeID. This results in the node having two IDs in the undo manager: the original and the newly created one from the redo.

To address this, we need to remove the bring-back node from the remapping when importing.