mobx 6.3.11 → 6.3.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobx",
3
- "version": "6.3.11",
3
+ "version": "6.3.12",
4
4
  "description": "Simple, scalable state management.",
5
5
  "source": "src/mobx.ts",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,8 @@ import {
34
34
  isFunction,
35
35
  UPDATE,
36
36
  IAtom,
37
- PureSpyEvent
37
+ PureSpyEvent,
38
+ allowStateChanges
38
39
  } from "../internal"
39
40
 
40
41
  export interface IKeyValueMap<V = any> {
@@ -107,7 +108,9 @@ export class ObservableMap<K = any, V = any>
107
108
  this.keysAtom_ = createAtom(__DEV__ ? `${this.name_}.keys()` : "ObservableMap.keys()")
108
109
  this.data_ = new Map()
109
110
  this.hasMap_ = new Map()
110
- this.merge(initialData)
111
+ allowStateChanges(true, () => {
112
+ this.merge(initialData)
113
+ })
111
114
  }
112
115
 
113
116
  private has_(key: K): boolean {