mobx 6.12.4 → 6.12.5
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/CHANGELOG.md +6 -0
- package/dist/mobx.cjs.development.js +9 -3
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +9 -3
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +9 -3
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +9 -3
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/dist/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/src/types/observablemap.ts +2 -1
- package/src/utils/utils.ts +9 -2
|
@@ -203,10 +203,16 @@ function createInstanceofPredicate(name, theClass) {
|
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
function isES6Map(thing) {
|
|
206
|
-
return thing
|
|
206
|
+
return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
|
|
207
|
+
}
|
|
208
|
+
function isPlainES6Map(thing) {
|
|
209
|
+
var mapProto = Object.getPrototypeOf(thing);
|
|
210
|
+
var objectProto = Object.getPrototypeOf(mapProto);
|
|
211
|
+
var nullProto = Object.getPrototypeOf(objectProto);
|
|
212
|
+
return nullProto === null;
|
|
207
213
|
}
|
|
208
214
|
function isES6Set(thing) {
|
|
209
|
-
return thing
|
|
215
|
+
return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
|
|
210
216
|
}
|
|
211
217
|
var hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== "undefined";
|
|
212
218
|
/**
|
|
@@ -4326,7 +4332,7 @@ var ObservableMap = /*#__PURE__*/function () {
|
|
|
4326
4332
|
return _this5.set(key, value);
|
|
4327
4333
|
});
|
|
4328
4334
|
} else if (isES6Map(other)) {
|
|
4329
|
-
if (other
|
|
4335
|
+
if (!isPlainES6Map(other)) {
|
|
4330
4336
|
die(19, other);
|
|
4331
4337
|
}
|
|
4332
4338
|
other.forEach(function (value, key) {
|