Skip to content

Commit a1699cb

Browse files
committed
fix(json-crdt): 🐛 update ModelApi internal state on RESET event
1 parent 37b3d14 commit a1699cb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/json-crdt/model/Model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ export class Model<N extends JsonNode = JsonNode<any>> implements Printable {
517517
if (api) {
518518
api.flush();
519519
api.builder.clock = this.clock;
520+
api.node = this.root;
520521
}
521522
// biome-ignore lint: index is not iterable
522523
index.forEach(({v: node}) => {

0 commit comments

Comments
 (0)