jotai-state-tree 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4248,6 +4248,9 @@ var PersistenceManager = class {
4248
4248
  ...prev,
4249
4249
  pendingSyncCount: queue.length
4250
4250
  }));
4251
+ if (this.patchDisposer) {
4252
+ this.patchDisposer();
4253
+ }
4251
4254
  this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
4252
4255
  this.handlePatch(patch, reversePatch);
4253
4256
  });
package/dist/index.js CHANGED
@@ -5061,6 +5061,9 @@ var PersistenceManager = class {
5061
5061
  ...prev,
5062
5062
  pendingSyncCount: queue.length
5063
5063
  }));
5064
+ if (this.patchDisposer) {
5065
+ this.patchDisposer();
5066
+ }
5064
5067
  this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
5065
5068
  this.handlePatch(patch, reversePatch);
5066
5069
  });
package/dist/index.mjs CHANGED
@@ -98,7 +98,7 @@ import {
98
98
  union,
99
99
  unprotect,
100
100
  walk
101
- } from "./chunk-37XARU7S.mjs";
101
+ } from "./chunk-MLAEAO2W.mjs";
102
102
 
103
103
  // src/map.ts
104
104
  var MSTMap = class extends Map {
package/dist/react.js CHANGED
@@ -1020,6 +1020,9 @@ var PersistenceManager = class {
1020
1020
  ...prev,
1021
1021
  pendingSyncCount: queue.length
1022
1022
  }));
1023
+ if (this.patchDisposer) {
1024
+ this.patchDisposer();
1025
+ }
1023
1026
  this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
1024
1027
  this.handlePatch(patch, reversePatch);
1025
1028
  });
package/dist/react.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  setActiveTrackingFn,
14
14
  setIsApplyingSnapshotOrPatch,
15
15
  useRouter
16
- } from "./chunk-37XARU7S.mjs";
16
+ } from "./chunk-MLAEAO2W.mjs";
17
17
 
18
18
  // src/react.ts
19
19
  import React, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jotai-state-tree",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "MobX-State-Tree API compatible library powered by Jotai",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -490,6 +490,9 @@ export class PersistenceManager {
490
490
  }));
491
491
 
492
492
  // Start listening to patches for optimistic sync
493
+ if (this.patchDisposer) {
494
+ this.patchDisposer();
495
+ }
493
496
  this.patchDisposer = onPatch(this.target, (patch, reversePatch) => {
494
497
  this.handlePatch(patch, reversePatch);
495
498
  });