mobx 6.13.7 → 6.15.0

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.
@@ -1012,7 +1012,8 @@
1012
1012
  // lone setter -> action setter
1013
1013
  if (descriptor.set) {
1014
1014
  // TODO make action applicable to setter and delegate to action.make_
1015
- var set = createAction(key.toString(), descriptor.set);
1015
+ var set = isAction(descriptor.set) ? descriptor.set // See #4553
1016
+ : createAction(key.toString(), descriptor.set);
1016
1017
  // own
1017
1018
  if (source === adm.target_) {
1018
1019
  return adm.defineProperty_(key, {
@@ -1377,13 +1378,14 @@
1377
1378
  _this.equals = equals;
1378
1379
  _this.value_ = enhancer(value, undefined, name_);
1379
1380
  if ( notifySpy && isSpyEnabled()) {
1381
+ var _this$value_;
1380
1382
  // only notify spy if this is a stand-alone observable
1381
1383
  spyReport({
1382
1384
  type: CREATE,
1383
1385
  object: _this,
1384
1386
  observableKind: "value",
1385
1387
  debugObjectName: _this.name_,
1386
- newValue: "" + _this.value_
1388
+ newValue: "" + ((_this$value_ = _this.value_) == null ? void 0 : _this$value_.toString())
1387
1389
  });
1388
1390
  }
1389
1391
  return _this;
@@ -2551,6 +2553,9 @@
2551
2553
  };
2552
2554
  abortSignal == null || abortSignal.addEventListener == null || abortSignal.addEventListener("abort", dispose);
2553
2555
  dispose[$mobx] = this;
2556
+ if ("dispose" in Symbol && typeof Symbol.dispose === "symbol") {
2557
+ dispose[Symbol.dispose] = dispose;
2558
+ }
2554
2559
  return dispose;
2555
2560
  };
2556
2561
  _proto.toString = function toString() {