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/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 instanceof Map;
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 instanceof Set;
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.constructor !== Map) {
4360
+ if (!isPlainES6Map(other)) {
4355
4361
  die(19, other);
4356
4362
  }
4357
4363
  other.forEach(function (value, key) {