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.
package/dist/mobx.esm.js CHANGED
@@ -1007,7 +1007,8 @@ function make_$5(adm, key, descriptor, source) {
1007
1007
  // lone setter -> action setter
1008
1008
  if (descriptor.set) {
1009
1009
  // TODO make action applicable to setter and delegate to action.make_
1010
- var set = createAction(key.toString(), descriptor.set);
1010
+ var set = isAction(descriptor.set) ? descriptor.set // See #4553
1011
+ : createAction(key.toString(), descriptor.set);
1011
1012
  // own
1012
1013
  if (source === adm.target_) {
1013
1014
  return adm.defineProperty_(key, {
@@ -1372,13 +1373,14 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
1372
1373
  _this.equals = equals;
1373
1374
  _this.value_ = enhancer(value, undefined, name_);
1374
1375
  if (process.env.NODE_ENV !== "production" && notifySpy && isSpyEnabled()) {
1376
+ var _this$value_;
1375
1377
  // only notify spy if this is a stand-alone observable
1376
1378
  spyReport({
1377
1379
  type: CREATE,
1378
1380
  object: _this,
1379
1381
  observableKind: "value",
1380
1382
  debugObjectName: _this.name_,
1381
- newValue: "" + _this.value_
1383
+ newValue: "" + ((_this$value_ = _this.value_) == null ? void 0 : _this$value_.toString())
1382
1384
  });
1383
1385
  }
1384
1386
  return _this;
@@ -2555,6 +2557,9 @@ var Reaction = /*#__PURE__*/function () {
2555
2557
  };
2556
2558
  abortSignal == null || abortSignal.addEventListener == null || abortSignal.addEventListener("abort", dispose);
2557
2559
  dispose[$mobx] = this;
2560
+ if ("dispose" in Symbol && typeof Symbol.dispose === "symbol") {
2561
+ dispose[Symbol.dispose] = dispose;
2562
+ }
2558
2563
  return dispose;
2559
2564
  };
2560
2565
  _proto.toString = function toString() {