We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d52131 + ad98179 commit 78abbc4Copy full SHA for 78abbc4
src/json-crdt-patch/codec/binary/Decoder.ts
@@ -29,8 +29,12 @@ export class Decoder extends CborDecoder<CrdtReader> {
29
* @returns A JSON CRDT patch.
30
*/
31
public decode(data: Uint8Array): Patch {
32
+ this.reader.reset(data);
33
+ return this.readPatch();
34
+ }
35
+
36
+ public readPatch(): Patch {
37
const reader = this.reader;
- reader.reset(data);
38
const sid = reader.vu57();
39
const time = reader.vu57();
40
const isServerClock = sid === SESSION.SERVER;
0 commit comments