mobx 6.1.7 → 6.1.8

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.1.7",
3
+ "version": "6.1.8",
4
4
  "description": "Simple, scalable state management.",
5
5
  "source": "src/mobx.ts",
6
6
  "main": "dist/index.js",
@@ -66,6 +66,15 @@ export function makeAutoObservable<T extends object, AdditionalKeys extends Prop
66
66
  // Use cached inferred annotations if available (only in classes)
67
67
  if (target[inferredAnnotationsSymbol]) {
68
68
  target[inferredAnnotationsSymbol].forEach((value, key) => adm.make_(key, value))
69
+ // Overrides are not cached, unless `true`, see #2832
70
+ if (overrides) {
71
+ ownKeys(overrides).forEach(key => {
72
+ const annotation = overrides[key]
73
+ if (annotation !== true) {
74
+ adm.make_(key, annotation)
75
+ }
76
+ })
77
+ }
69
78
  } else {
70
79
  const ignoreKeys = { [$mobx]: 1, [inferredAnnotationsSymbol]: 1, constructor: 1 }
71
80
  const make = key => {