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.
@@ -209,10 +209,16 @@
209
209
  };
210
210
  }
211
211
  function isES6Map(thing) {
212
- return thing instanceof Map;
212
+ return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
213
+ }
214
+ function isPlainES6Map(thing) {
215
+ var mapProto = Object.getPrototypeOf(thing);
216
+ var objectProto = Object.getPrototypeOf(mapProto);
217
+ var nullProto = Object.getPrototypeOf(objectProto);
218
+ return nullProto === null;
213
219
  }
214
220
  function isES6Set(thing) {
215
- return thing instanceof Set;
221
+ return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
216
222
  }
217
223
  var hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== "undefined";
218
224
  /**
@@ -4332,7 +4338,7 @@
4332
4338
  return _this5.set(key, value);
4333
4339
  });
4334
4340
  } else if (isES6Map(other)) {
4335
- if (other.constructor !== Map) {
4341
+ if (!isPlainES6Map(other)) {
4336
4342
  die(19, other);
4337
4343
  }
4338
4344
  other.forEach(function (value, key) {