From 71d2e4241dd0bc0d034fb6a21a4ac50b0d9e58d6 Mon Sep 17 00:00:00 2001 From: streamich Date: Sat, 2 Dec 2023 18:25:08 +0100 Subject: [PATCH] =?UTF-8?q?fix(json-crdt):=20=F0=9F=90=9B=20increment=20mo?= =?UTF-8?q?del.tick=20on=20.reset()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/json-crdt/model/Model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/json-crdt/model/Model.ts b/src/json-crdt/model/Model.ts index c18e31ce85..c5876f1a05 100644 --- a/src/json-crdt/model/Model.ts +++ b/src/json-crdt/model/Model.ts @@ -169,7 +169,7 @@ export class Model implements Printable { * through this method. * * For advanced use only, better use `applyPatch` instead. You MUST increment - * the `tick` property and call `onchange` after calling this method. + * the `tick` property and call the necessary event emitters manually. * * @param op Any JSON CRDT Patch operation * @ignore @@ -349,6 +349,7 @@ export class Model implements Printable { api.node = newNode; newNode.api = api; }); + this.tick++; this.onreset?.(); }