Closed eveshum closed 4 years ago
I just added a test for this case!
For reference, the test without this change fails like this:
Uncaught ShareDBError: Missing version in ingested snapshot. dogs.fido
at Doc.ingestSnapshot (node_modules/sharedb/lib/client/doc.js:163:15)
at new RemoteDoc (lib/Model/RemoteDoc.js:28:17)
at Collection.add (lib/Model/collections.js:115:13)
at Model.getOrCreateDoc (lib/Model/collections.js:69:44)
at Model.unbundle (lib/Model/unbundle.js:13:12)
at test/Model/bundle.js:27:18
at finishBundle (lib/Model/bundle.js:35:5)
at process._tickCallback (internal/process/next_tick.js:61:11)
If shareDoc.version is null, then we can get a
ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION
error