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.
@@ -203,10 +203,16 @@ function createInstanceofPredicate(name, theClass) {
203
203
  };
204
204
  }
205
205
  function isES6Map(thing) {
206
- return thing instanceof Map;
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 instanceof Set;
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.constructor !== Map) {
4335
+ if (!isPlainES6Map(other)) {
4330
4336
  die(19, other);
4331
4337
  }
4332
4338
  other.forEach(function (value, key) {