When applying an update from one doc to another, the second doc loses its data structures. This makes it challenging to read the original text.
Reproduce
See:
In [17]: from pycrdt import Doc as YDoc
In [18]: doc = YDoc()
In [19]: doc['text'] = Text('Hello world')
In [20]: other = YDoc()
In [21]: other.apply_update(doc.get_update())
In [22]: dict(doc)
Out[22]: {'text': <pycrdt._text.Text at 0x2a7224910>}
In [23]: dict(other)
Out[23]: {'text': None}
In the example above, you can't actually get the text in the text key. It just returns None.
Description
When applying an update from one doc to another, the second doc loses its data structures. This makes it challenging to read the original text.
Reproduce
See:
In the example above, you can't actually get the text in the
text
key. It just returnsNone
.Expected behavior
I would expect a
Text
object to be returned.Context
pycrdt
version: 0.10.6