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
package/dist/mobx.esm.js
CHANGED
|
@@ -204,10 +204,16 @@ function createInstanceofPredicate(name, theClass) {
|
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
function isES6Map(thing) {
|
|
207
|
-
return thing
|
|
207
|
+
return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
|
|
208
|
+
}
|
|
209
|
+
function isPlainES6Map(thing) {
|
|
210
|
+
var mapProto = Object.getPrototypeOf(thing);
|
|
211
|
+
var objectProto = Object.getPrototypeOf(mapProto);
|
|
212
|
+
var nullProto = Object.getPrototypeOf(objectProto);
|
|
213
|
+
return nullProto === null;
|
|
208
214
|
}
|
|
209
215
|
function isES6Set(thing) {
|
|
210
|
-
return thing
|
|
216
|
+
return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
|
|
211
217
|
}
|
|
212
218
|
var hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== "undefined";
|
|
213
219
|
/**
|
|
@@ -4351,7 +4357,7 @@ var ObservableMap = /*#__PURE__*/function () {
|
|
|
4351
4357
|
return _this5.set(key, value);
|
|
4352
4358
|
});
|
|
4353
4359
|
} else if (isES6Map(other)) {
|
|
4354
|
-
if (other
|
|
4360
|
+
if (!isPlainES6Map(other)) {
|
|
4355
4361
|
die(19, other);
|
|
4356
4362
|
}
|
|
4357
4363
|
other.forEach(function (value, key) {
|