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.
1 parent 919196b commit 7076cfeCopy full SHA for 7076cfe
src/json-crdt/json-patch/JsonPatch.ts
@@ -4,9 +4,11 @@ import type {Operation} from '../../json-patch';
4
import type {Patch} from '../../json-crdt-patch/Patch';
5
6
export class JsonPatch {
7
- protected draft = new JsonPatchDraft(this.model);
+ protected draft: JsonPatchDraft;
8
9
- constructor(public readonly model: Model) {}
+ constructor(public readonly model: Model) {
10
+ this.draft = new JsonPatchDraft(this.model);
11
+ }
12
13
public apply(ops: Operation[]): this {
14
this.draft.applyOps(ops);
0 commit comments