mobx 6.13.1 → 6.13.2

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,11 @@
1
1
  # mobx
2
2
 
3
+ ## 6.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f1f922152b45357a49ee6b310e9e0ecf38bd3955`](https://github.com/mobxjs/mobx/commit/f1f922152b45357a49ee6b310e9e0ecf38bd3955) [#3921](https://github.com/mobxjs/mobx/pull/3921) Thanks [@urugator](https://github.com/urugator)! - fix: #3919 new set methods not working with observable set
8
+
3
9
  ## 6.13.1
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -55,8 +55,8 @@ MobX is made possible by the generosity of the sponsors below, and many other [i
55
55
  <a href="https://upper.co/?utm_source=github_mobxjs_sponsorship&utm_medium=paid_acquisition&utm_campaign=sponsorship"><img src="https://mobx.js.org/assets/upper.png" align="center" width="100" title="UPPER" alt="UPPER"/></a>
56
56
  <a href="https://careers.dazn.com/"><img src="https://mobx.js.org/assets/dazn.png" align="center" width="100" title="DAZN" alt="DAZN"></a>
57
57
  <a href="https://talentplot.com/"><img src="https://mobx.js.org/assets/talentplot.png" align="center" width="100" title="talentplot" alt="talentplot"></a>
58
-
59
- ## <a href="https://www.easeus.com/?utm_source=github_mobxjs_sponsorship&utm_medium=readme&utm_campaign=sponsorship"><img src="https://mobx.js.org/assets/easeus.png" align="center" width="100" title="EaseUS" alt="EaseUS"/></a>
58
+ <a href="https://www.easeus.com/?utm_source=github_mobxjs_sponsorship&utm_medium=readme&utm_campaign=sponsorship"><img src="https://mobx.js.org/assets/easeus.png" align="center" width="100" title="EaseUS" alt="EaseUS"/></a>
59
+ <a href="https://route4me.com/"><img src="https://mobx.js.org/assets/route4me.png" align="center" width="100" title="Route Planner and Route Optimizer" alt="Route Planner and Route Optimizer"/></a>
60
60
 
61
61
  ## Introduction
62
62
 
@@ -206,15 +206,24 @@ function createInstanceofPredicate(name, theClass) {
206
206
  return isObject(x) && x[propName] === true;
207
207
  };
208
208
  }
209
+ /**
210
+ * Yields true for both native and observable Map, even across different windows.
211
+ */
209
212
  function isES6Map(thing) {
210
213
  return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
211
214
  }
215
+ /**
216
+ * Makes sure a Map is an instance of non-inherited native or observable Map.
217
+ */
212
218
  function isPlainES6Map(thing) {
213
219
  var mapProto = Object.getPrototypeOf(thing);
214
220
  var objectProto = Object.getPrototypeOf(mapProto);
215
221
  var nullProto = Object.getPrototypeOf(objectProto);
216
222
  return nullProto === null;
217
223
  }
224
+ /**
225
+ * Yields true for both native and observable Set, even across different windows.
226
+ */
218
227
  function isES6Set(thing) {
219
228
  return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
220
229
  }
@@ -4771,7 +4780,7 @@ var ObservableSet = /*#__PURE__*/function () {
4771
4780
  });
4772
4781
  };
4773
4782
  _proto.intersection = function intersection(otherSet) {
4774
- if (isES6Set(otherSet)) {
4783
+ if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
4775
4784
  return otherSet.intersection(this);
4776
4785
  } else {
4777
4786
  var dehancedSet = new Set(this);
@@ -4779,7 +4788,7 @@ var ObservableSet = /*#__PURE__*/function () {
4779
4788
  }
4780
4789
  };
4781
4790
  _proto.union = function union(otherSet) {
4782
- if (isES6Set(otherSet)) {
4791
+ if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
4783
4792
  return otherSet.union(this);
4784
4793
  } else {
4785
4794
  var dehancedSet = new Set(this);
@@ -4790,7 +4799,7 @@ var ObservableSet = /*#__PURE__*/function () {
4790
4799
  return new Set(this).difference(otherSet);
4791
4800
  };
4792
4801
  _proto.symmetricDifference = function symmetricDifference(otherSet) {
4793
- if (isES6Set(otherSet)) {
4802
+ if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
4794
4803
  return otherSet.symmetricDifference(this);
4795
4804
  } else {
4796
4805
  var dehancedSet = new Set(this);
@@ -4804,7 +4813,7 @@ var ObservableSet = /*#__PURE__*/function () {
4804
4813
  return new Set(this).isSupersetOf(otherSet);
4805
4814
  };
4806
4815
  _proto.isDisjointFrom = function isDisjointFrom(otherSet) {
4807
- if (isES6Set(otherSet)) {
4816
+ if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
4808
4817
  return otherSet.isDisjointFrom(this);
4809
4818
  } else {
4810
4819
  var dehancedSet = new Set(this);