mobx 6.13.6 → 6.13.7
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 +6 -0
- package/dist/mobx.cjs.development.js +8 -7
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +8 -7
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +8 -7
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +8 -7
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/dist/types/observableset.d.ts +4 -2
- package/package.json +1 -1
- package/src/types/observableset.ts +19 -14
- package/src/utils/eq.ts +5 -4
|
@@ -4678,8 +4678,8 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4678
4678
|
if (!change) {
|
|
4679
4679
|
return this;
|
|
4680
4680
|
}
|
|
4681
|
-
//
|
|
4682
|
-
|
|
4681
|
+
// implemented reassignment same as it's done for ObservableMap
|
|
4682
|
+
value = change.newValue;
|
|
4683
4683
|
}
|
|
4684
4684
|
if (!this.has(value)) {
|
|
4685
4685
|
transaction(function () {
|
|
@@ -5734,6 +5734,8 @@ function deepEqual(a, b, depth) {
|
|
|
5734
5734
|
return eq(a, b, depth);
|
|
5735
5735
|
}
|
|
5736
5736
|
// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289
|
|
5737
|
+
// Modified: "Deep compare objects" part to iterate over keys in forward order instead of reverse order.
|
|
5738
|
+
//
|
|
5737
5739
|
// Internal recursive comparison function for `isEqual`.
|
|
5738
5740
|
function eq(a, b, depth, aStack, bStack) {
|
|
5739
5741
|
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
|
@@ -5846,15 +5848,14 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
5846
5848
|
} else {
|
|
5847
5849
|
// Deep compare objects.
|
|
5848
5850
|
var keys = Object.keys(a);
|
|
5849
|
-
var
|
|
5850
|
-
length = keys.length;
|
|
5851
|
+
var _length = keys.length;
|
|
5851
5852
|
// Ensure that both objects contain the same number of properties before comparing deep equality.
|
|
5852
|
-
if (Object.keys(b).length !==
|
|
5853
|
+
if (Object.keys(b).length !== _length) {
|
|
5853
5854
|
return false;
|
|
5854
5855
|
}
|
|
5855
|
-
|
|
5856
|
+
for (var i = 0; i < _length; i++) {
|
|
5856
5857
|
// Deep compare each member
|
|
5857
|
-
key = keys[
|
|
5858
|
+
var key = keys[i];
|
|
5858
5859
|
if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) {
|
|
5859
5860
|
return false;
|
|
5860
5861
|
}
|