mobx 6.3.7 → 6.3.11

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # mobx
2
2
 
3
+ ## 6.3.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bf5da6ba`](https://github.com/mobxjs/mobx/commit/bf5da6bad982dc3d955d5f27f7fea6f94b041ea7) [#3239](https://github.com/mobxjs/mobx/pull/3239) Thanks [@bernardobelchior](https://github.com/bernardobelchior)! - Improved `toJS` jsdoc
8
+
9
+ ## 6.3.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [`2d70798e`](https://github.com/mobxjs/mobx/commit/2d70798eb327187d93757757ceaf410a608735b2) [#3233](https://github.com/mobxjs/mobx/pull/3233) Thanks [@anderlaw](https://github.com/anderlaw)! - `eq.ts` fix comparer logic
14
+
15
+ ## 6.3.9
16
+
17
+ ### Patch Changes
18
+
19
+ - [`87e5a037`](https://github.com/mobxjs/mobx/commit/87e5a03735dbc1930e54a15b5ce88ad684bc3dc1) [#3214](https://github.com/mobxjs/mobx/pull/3214) Thanks [@urugator](https://github.com/urugator)! - `requiresReaction` always takes precedence over global `computedRequiresReaction`
20
+
21
+ * [`9b90e25c`](https://github.com/mobxjs/mobx/commit/9b90e25c7bc0cdc0a07d1f847683604e86790f24) [#3198](https://github.com/mobxjs/mobx/pull/3198) Thanks [@urugator](https://github.com/urugator)! - fix `isPlainObject` impl (fixes #3197)
22
+
23
+ ## 6.3.8
24
+
25
+ ### Patch Changes
26
+
27
+ - [`9d5e65cb`](https://github.com/mobxjs/mobx/commit/9d5e65cbd612f262d925e57cebb559f5cf36c502) [#3193](https://github.com/mobxjs/mobx/pull/3193) Thanks [@ChocolateLoverRaj](https://github.com/ChocolateLoverRaj)! - Make `IAtom['reportObserved']` return `boolean`
28
+
29
+ * [`55508af6`](https://github.com/mobxjs/mobx/commit/55508af690fa875e6affaf30f34280b3f27b6126) [#3189](https://github.com/mobxjs/mobx/pull/3189) Thanks [@RvanderLaan](https://github.com/RvanderLaan)! - Fix for RangeError in ObservableArray.replace for large arrays
30
+
3
31
  ## 6.3.7
4
32
 
5
33
  ### Patch Changes
@@ -1,4 +1,7 @@
1
1
  /**
2
- * Basically, a deep clone, so that no reactive property will exist anymore.
2
+ * Recursively converts an observable to it's non-observable native counterpart.
3
+ * It does NOT recurse into non-observables, these are left as they are, even if they contain observables.
4
+ * Computed and other non-enumerable properties are completely ignored.
5
+ * Complex scenarios require custom solution, eg implementing `toJSON` or using `serializr` lib.
3
6
  */
4
7
  export declare function toJS<T>(source: T, options?: any): T;
@@ -1,7 +1,7 @@
1
1
  import { IDerivationState_, IObservable, IDerivation, Lambda } from "../internal";
2
2
  export declare const $mobx: unique symbol;
3
3
  export interface IAtom extends IObservable {
4
- reportObserved(): any;
4
+ reportObserved(): boolean;
5
5
  reportChanged(): any;
6
6
  }
7
7
  export declare class Atom implements IAtom {
@@ -168,12 +168,11 @@ function isObject(value) {
168
168
  return value !== null && typeof value === "object";
169
169
  }
170
170
  function isPlainObject(value) {
171
- var _proto$constructor;
172
-
173
171
  if (!isObject(value)) return false;
174
172
  var proto = Object.getPrototypeOf(value);
175
173
  if (proto == null) return true;
176
- return ((_proto$constructor = proto.constructor) == null ? void 0 : _proto$constructor.toString()) === plainObjectString;
174
+ var protoConstructor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
175
+ return typeof protoConstructor === "function" && protoConstructor.toString() === plainObjectString;
177
176
  } // https://stackoverflow.com/a/37865170
178
177
 
179
178
  function isGenerator(obj) {
@@ -268,6 +267,9 @@ function _defineProperties(target, props) {
268
267
  function _createClass(Constructor, protoProps, staticProps) {
269
268
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
270
269
  if (staticProps) _defineProperties(Constructor, staticProps);
270
+ Object.defineProperty(Constructor, "prototype", {
271
+ writable: false
272
+ });
271
273
  return Constructor;
272
274
  }
273
275
 
@@ -292,7 +294,17 @@ function _extends() {
292
294
  function _inheritsLoose(subClass, superClass) {
293
295
  subClass.prototype = Object.create(superClass.prototype);
294
296
  subClass.prototype.constructor = subClass;
295
- subClass.__proto__ = superClass;
297
+
298
+ _setPrototypeOf(subClass, superClass);
299
+ }
300
+
301
+ function _setPrototypeOf(o, p) {
302
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
303
+ o.__proto__ = p;
304
+ return o;
305
+ };
306
+
307
+ return _setPrototypeOf(o, p);
296
308
  }
297
309
 
298
310
  function _assertThisInitialized(self) {
@@ -321,28 +333,24 @@ function _arrayLikeToArray(arr, len) {
321
333
  }
322
334
 
323
335
  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
324
- var it;
325
-
326
- if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
327
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
328
- if (it) o = it;
329
- var i = 0;
330
- return function () {
331
- if (i >= o.length) return {
332
- done: true
333
- };
334
- return {
335
- done: false,
336
- value: o[i++]
337
- };
336
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
337
+ if (it) return (it = it.call(o)).next.bind(it);
338
+
339
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
340
+ if (it) o = it;
341
+ var i = 0;
342
+ return function () {
343
+ if (i >= o.length) return {
344
+ done: true
338
345
  };
339
- }
340
-
341
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
346
+ return {
347
+ done: false,
348
+ value: o[i++]
349
+ };
350
+ };
342
351
  }
343
352
 
344
- it = o[Symbol.iterator]();
345
- return it.next.bind(it);
353
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
346
354
  }
347
355
 
348
356
  var storedAnnotationsSymbol = /*#__PURE__*/Symbol("mobx-stored-annotations");
@@ -626,7 +634,7 @@ function make_$1(adm, key, descriptor, source) {
626
634
  var _this$options_;
627
635
 
628
636
  // bound
629
- if ((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) {
637
+ if ((_this$options_ = this.options_) != null && _this$options_.bound) {
630
638
  return this.extend_(adm, key, descriptor, false) === null ? 0
631
639
  /* Cancel */
632
640
  : 1
@@ -684,7 +692,7 @@ safeDescriptors) {
684
692
  assertActionDescriptor(adm, annotation, key, descriptor);
685
693
  var value = descriptor.value;
686
694
 
687
- if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {
695
+ if ((_annotation$options_ = annotation.options_) != null && _annotation$options_.bound) {
688
696
  var _adm$proxy_;
689
697
 
690
698
  value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);
@@ -692,7 +700,7 @@ safeDescriptors) {
692
700
 
693
701
  return {
694
702
  value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false, // https://github.com/mobxjs/mobx/discussions/3140
695
- ((_annotation$options_4 = annotation.options_) == null ? void 0 : _annotation$options_4.bound) ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : undefined),
703
+ (_annotation$options_4 = annotation.options_) != null && _annotation$options_4.bound ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : undefined),
696
704
  // Non-configurable for classes
697
705
  // prevents accidental field redefinition in subclass
698
706
  configurable: safeDescriptors ? adm.isPlainObject_ : true,
@@ -727,7 +735,7 @@ function make_$2(adm, key, descriptor, source) {
727
735
  // bound - must annotate protos to support super.flow()
728
736
 
729
737
 
730
- if (((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) && !isFlow(adm.target_[key])) {
738
+ if ((_this$options_ = this.options_) != null && _this$options_.bound && !isFlow(adm.target_[key])) {
731
739
  if (this.extend_(adm, key, descriptor, false) === null) return 0
732
740
  /* Cancel */
733
741
  ;
@@ -910,11 +918,11 @@ function make_$5(adm, key, descriptor, source) {
910
918
  if (isGenerator(descriptor.value)) {
911
919
  var _this$options_;
912
920
 
913
- var flowAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? flow.bound : flow;
921
+ var flowAnnotation = (_this$options_ = this.options_) != null && _this$options_.autoBind ? flow.bound : flow;
914
922
  return flowAnnotation.make_(adm, key, descriptor, source);
915
923
  }
916
924
 
917
- var actionAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.autoBind) ? autoAction.bound : autoAction;
925
+ var actionAnnotation = (_this$options_2 = this.options_) != null && _this$options_2.autoBind ? autoAction.bound : autoAction;
918
926
  return actionAnnotation.make_(adm, key, descriptor, source);
919
927
  } // other -> observable
920
928
  // Copy props from proto as well, see test:
@@ -923,7 +931,7 @@ function make_$5(adm, key, descriptor, source) {
923
931
 
924
932
  var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option
925
933
 
926
- if (typeof descriptor.value === "function" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {
934
+ if (typeof descriptor.value === "function" && (_this$options_4 = this.options_) != null && _this$options_4.autoBind) {
927
935
  var _adm$proxy_;
928
936
 
929
937
  descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);
@@ -951,7 +959,7 @@ function extend_$5(adm, key, descriptor, proxyTrap) {
951
959
  // if function respect autoBind option
952
960
 
953
961
 
954
- if (typeof descriptor.value === "function" && ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.autoBind)) {
962
+ if (typeof descriptor.value === "function" && (_this$options_5 = this.options_) != null && _this$options_5.autoBind) {
955
963
  var _adm$proxy_2;
956
964
 
957
965
  descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);
@@ -1229,7 +1237,7 @@ function allowStateChangesEnd(prev) {
1229
1237
  var _Symbol$toPrimitive;
1230
1238
  var CREATE = "create";
1231
1239
  _Symbol$toPrimitive = Symbol.toPrimitive;
1232
- var ObservableValue = /*#__PURE__*/function (_Atom) {
1240
+ var ObservableValue = /*#__PURE__*/function (_Atom, _Symbol$toPrimitive2) {
1233
1241
  _inheritsLoose(ObservableValue, _Atom);
1234
1242
 
1235
1243
  function ObservableValue(value, enhancer, name_, notifySpy, equals) {
@@ -1376,12 +1384,12 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
1376
1384
  return toPrimitive(this.get());
1377
1385
  };
1378
1386
 
1379
- _proto[_Symbol$toPrimitive] = function () {
1387
+ _proto[_Symbol$toPrimitive2] = function () {
1380
1388
  return this.valueOf();
1381
1389
  };
1382
1390
 
1383
1391
  return ObservableValue;
1384
- }(Atom);
1392
+ }(Atom, _Symbol$toPrimitive);
1385
1393
  var isObservableValue = /*#__PURE__*/createInstanceofPredicate("ObservableValue", ObservableValue);
1386
1394
 
1387
1395
  var _Symbol$toPrimitive$1;
@@ -1406,7 +1414,7 @@ var _Symbol$toPrimitive$1;
1406
1414
  */
1407
1415
 
1408
1416
  _Symbol$toPrimitive$1 = Symbol.toPrimitive;
1409
- var ComputedValue = /*#__PURE__*/function () {
1417
+ var ComputedValue = /*#__PURE__*/function (_Symbol$toPrimitive2) {
1410
1418
  // nodes we are looking at. Our value depends on these nodes
1411
1419
  // during tracking it's an array with new observed observers
1412
1420
  // to check for cycles
@@ -1460,7 +1468,7 @@ var ComputedValue = /*#__PURE__*/function () {
1460
1468
 
1461
1469
  this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer["default"]);
1462
1470
  this.scope_ = options.context;
1463
- this.requiresReaction_ = !!options.requiresReaction;
1471
+ this.requiresReaction_ = options.requiresReaction;
1464
1472
  this.keepAlive_ = !!options.keepAlive;
1465
1473
  }
1466
1474
 
@@ -1628,7 +1636,7 @@ var ComputedValue = /*#__PURE__*/function () {
1628
1636
  console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute.");
1629
1637
  }
1630
1638
 
1631
- if (globalState.computedRequiresReaction || this.requiresReaction_) {
1639
+ if (typeof this.requiresReaction_ === "boolean" ? this.requiresReaction_ : globalState.computedRequiresReaction) {
1632
1640
  console.warn("[mobx] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute.");
1633
1641
  }
1634
1642
  };
@@ -1641,12 +1649,12 @@ var ComputedValue = /*#__PURE__*/function () {
1641
1649
  return toPrimitive(this.get());
1642
1650
  };
1643
1651
 
1644
- _proto[_Symbol$toPrimitive$1] = function () {
1652
+ _proto[_Symbol$toPrimitive2] = function () {
1645
1653
  return this.valueOf();
1646
1654
  };
1647
1655
 
1648
1656
  return ComputedValue;
1649
- }();
1657
+ }(_Symbol$toPrimitive$1);
1650
1658
  var isComputedValue = /*#__PURE__*/createInstanceofPredicate("ComputedValue", ComputedValue);
1651
1659
 
1652
1660
  var IDerivationState_;
@@ -2187,8 +2195,8 @@ function propagateChangeConfirmed(observable) {
2187
2195
  }
2188
2196
  } else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.
2189
2197
  ) {
2190
- observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;
2191
- }
2198
+ observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;
2199
+ }
2192
2200
  }); // invariantLOS(observable, "confirmed end");
2193
2201
  } // Used by computed when its dependency changed, but we don't wan't to immediately recompute.
2194
2202
 
@@ -3216,7 +3224,10 @@ function toJSHelper(source, __alreadySeen) {
3216
3224
  }
3217
3225
  }
3218
3226
  /**
3219
- * Basically, a deep clone, so that no reactive property will exist anymore.
3227
+ * Recursively converts an observable to it's non-observable native counterpart.
3228
+ * It does NOT recurse into non-observables, these are left as they are, even if they contain observables.
3229
+ * Computed and other non-enumerable properties are completely ignored.
3230
+ * Complex scenarios require custom solution, eg implementing `toJSON` or using `serializr` lib.
3220
3231
  */
3221
3232
 
3222
3233
 
@@ -3683,9 +3694,12 @@ var ObservableArrayAdministration = /*#__PURE__*/function () {
3683
3694
 
3684
3695
  return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));
3685
3696
  } else {
3686
- var res = this.values_.slice(index, index + deleteCount);
3687
- var oldItems = this.values_.slice(index + deleteCount);
3688
- this.values_.length = index + newItems.length - deleteCount;
3697
+ // The items removed by the splice
3698
+ var res = this.values_.slice(index, index + deleteCount); // The items that that should remain at the end of the array
3699
+
3700
+ var oldItems = this.values_.slice(index + deleteCount); // New length is the previous length + addition count - deletion count
3701
+
3702
+ this.values_.length += newItems.length - deleteCount;
3689
3703
 
3690
3704
  for (var i = 0; i < newItems.length; i++) {
3691
3705
  this.values_[index + i] = newItems[i];
@@ -4002,7 +4016,7 @@ var DELETE = "delete"; // just extend Map? See also https://gist.github.com/nest
4002
4016
 
4003
4017
  _Symbol$iterator = Symbol.iterator;
4004
4018
  _Symbol$toStringTag = Symbol.toStringTag;
4005
- var ObservableMap = /*#__PURE__*/function () {
4019
+ var ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4006
4020
  // hasMap, not hashMap >-).
4007
4021
  function ObservableMap(initialData, enhancer_, name_) {
4008
4022
  if (enhancer_ === void 0) {
@@ -4108,7 +4122,8 @@ var ObservableMap = /*#__PURE__*/function () {
4108
4122
  name: key
4109
4123
  } : null;
4110
4124
 
4111
- if ( notifySpy) spyReportStart(_change);
4125
+ if ( notifySpy) spyReportStart(_change); // TODO fix type
4126
+
4112
4127
  transaction(function () {
4113
4128
  var _this2$hasMap_$get;
4114
4129
 
@@ -4146,7 +4161,8 @@ var ObservableMap = /*#__PURE__*/function () {
4146
4161
  name: key,
4147
4162
  newValue: newValue
4148
4163
  } : null;
4149
- if ( notifySpy) spyReportStart(change);
4164
+ if ( notifySpy) spyReportStart(change); // TODO fix type
4165
+
4150
4166
  observable.setNewValue_(newValue);
4151
4167
  if (notify) notifyListeners(this, change);
4152
4168
  if ( notifySpy) spyReportEnd();
@@ -4180,7 +4196,8 @@ var ObservableMap = /*#__PURE__*/function () {
4180
4196
  name: key,
4181
4197
  newValue: newValue
4182
4198
  } : null;
4183
- if ( notifySpy) spyReportStart(change);
4199
+ if ( notifySpy) spyReportStart(change); // TODO fix type
4200
+
4184
4201
  if (notify) notifyListeners(this, change);
4185
4202
  if ( notifySpy) spyReportEnd();
4186
4203
  };
@@ -4237,7 +4254,7 @@ var ObservableMap = /*#__PURE__*/function () {
4237
4254
  });
4238
4255
  };
4239
4256
 
4240
- _proto[_Symbol$iterator] = function () {
4257
+ _proto[_Symbol$iterator2] = function () {
4241
4258
  return this.entries();
4242
4259
  };
4243
4260
 
@@ -4417,14 +4434,14 @@ var ObservableMap = /*#__PURE__*/function () {
4417
4434
  return this.data_.size;
4418
4435
  }
4419
4436
  }, {
4420
- key: _Symbol$toStringTag,
4437
+ key: _Symbol$toStringTag2,
4421
4438
  get: function get() {
4422
4439
  return "Map";
4423
4440
  }
4424
4441
  }]);
4425
4442
 
4426
4443
  return ObservableMap;
4427
- }(); // eslint-disable-next-line
4444
+ }(_Symbol$iterator, _Symbol$toStringTag); // eslint-disable-next-line
4428
4445
 
4429
4446
  var isObservableMap = /*#__PURE__*/createInstanceofPredicate("ObservableMap", ObservableMap);
4430
4447
 
@@ -4450,7 +4467,7 @@ var _Symbol$iterator$1, _Symbol$toStringTag$1;
4450
4467
  var ObservableSetMarker = {};
4451
4468
  _Symbol$iterator$1 = Symbol.iterator;
4452
4469
  _Symbol$toStringTag$1 = Symbol.toStringTag;
4453
- var ObservableSet = /*#__PURE__*/function () {
4470
+ var ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4454
4471
  function ObservableSet(initialData, enhancer, name_) {
4455
4472
  if (enhancer === void 0) {
4456
4473
  enhancer = deepEnhancer;
@@ -4683,7 +4700,7 @@ var ObservableSet = /*#__PURE__*/function () {
4683
4700
  return "[object ObservableSet]";
4684
4701
  };
4685
4702
 
4686
- _proto[_Symbol$iterator$1] = function () {
4703
+ _proto[_Symbol$iterator2] = function () {
4687
4704
  return this.values();
4688
4705
  };
4689
4706
 
@@ -4694,14 +4711,14 @@ var ObservableSet = /*#__PURE__*/function () {
4694
4711
  return this.data_.size;
4695
4712
  }
4696
4713
  }, {
4697
- key: _Symbol$toStringTag$1,
4714
+ key: _Symbol$toStringTag2,
4698
4715
  get: function get() {
4699
4716
  return "Set";
4700
4717
  }
4701
4718
  }]);
4702
4719
 
4703
4720
  return ObservableSet;
4704
- }(); // eslint-disable-next-line
4721
+ }(_Symbol$iterator$1, _Symbol$toStringTag$1); // eslint-disable-next-line
4705
4722
 
4706
4723
  var isObservableSet = /*#__PURE__*/createInstanceofPredicate("ObservableSet", ObservableSet);
4707
4724
 
@@ -4887,7 +4904,7 @@ var ObservableObjectAdministration = /*#__PURE__*/function () {
4887
4904
  // When called from super() some props may not exist yet.
4888
4905
  // However we don't have to worry about missing prop,
4889
4906
  // because the decorator must have been applied to something.
4890
- if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) == null ? void 0 : _this$target_$storedA[key]) {
4907
+ if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) != null && _this$target_$storedA[key]) {
4891
4908
  return; // will be annotated by subclass constructor
4892
4909
  } else {
4893
4910
  die(1, annotation.annotationType_, this.name_ + "." + key.toString());
@@ -5391,7 +5408,7 @@ inherit(StubArray, Array.prototype); // Weex proto freeze protection was here,
5391
5408
  // but it is unclear why the hack is need as MobX never changed the prototype
5392
5409
  // anyway, so removed it in V6
5393
5410
 
5394
- var LegacyObservableArray = /*#__PURE__*/function (_StubArray) {
5411
+ var LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringTag, _Symbol$iterator) {
5395
5412
  _inheritsLoose(LegacyObservableArray, _StubArray);
5396
5413
 
5397
5414
  function LegacyObservableArray(initialValues, enhancer, name, owned) {
@@ -5436,7 +5453,7 @@ var LegacyObservableArray = /*#__PURE__*/function (_StubArray) {
5436
5453
  }));
5437
5454
  };
5438
5455
 
5439
- _proto[Symbol.iterator] = function () {
5456
+ _proto[_Symbol$iterator] = function () {
5440
5457
  var self = this;
5441
5458
  var nextIndex = 0;
5442
5459
  return makeIterable({
@@ -5462,14 +5479,14 @@ var LegacyObservableArray = /*#__PURE__*/function (_StubArray) {
5462
5479
  this[$mobx].setArrayLength_(newLength);
5463
5480
  }
5464
5481
  }, {
5465
- key: Symbol.toStringTag,
5482
+ key: _Symbol$toStringTag,
5466
5483
  get: function get() {
5467
5484
  return "Array";
5468
5485
  }
5469
5486
  }]);
5470
5487
 
5471
5488
  return LegacyObservableArray;
5472
- }(StubArray);
5489
+ }(StubArray, Symbol.toStringTag, Symbol.iterator);
5473
5490
 
5474
5491
  Object.entries(arrayExtensions).forEach(function (_ref) {
5475
5492
  var prop = _ref[0],
@@ -5592,7 +5609,7 @@ function eq(a, b, depth, aStack, bStack) {
5592
5609
  if (a !== a) return b !== b; // Exhaust primitive checks
5593
5610
 
5594
5611
  var type = typeof a;
5595
- if (!isFunction(type) && type !== "object" && typeof b != "object") return false; // Compare `[[Class]]` names.
5612
+ if (type !== "function" && type !== "object" && typeof b != "object") return false; // Compare `[[Class]]` names.
5596
5613
 
5597
5614
  var className = toString.call(a);
5598
5615
  if (className !== toString.call(b)) return false;