@yiin/reactive-proxy-state 1.0.40 → 1.0.41
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/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3295,7 +3295,7 @@ function wrapMap(map, emit, path = []) {
|
|
|
3295
3295
|
path: cachedPath,
|
|
3296
3296
|
key,
|
|
3297
3297
|
oldValue,
|
|
3298
|
-
newValue: value2
|
|
3298
|
+
newValue: value2 !== null && typeof value2 === "object" ? deepClone(value2) : value2
|
|
3299
3299
|
};
|
|
3300
3300
|
emit?.(event);
|
|
3301
3301
|
if (!existed) {
|
|
@@ -3797,7 +3797,7 @@ function wrapArray(arr, emit, path = []) {
|
|
|
3797
3797
|
action: "set",
|
|
3798
3798
|
path: newPath,
|
|
3799
3799
|
oldValue,
|
|
3800
|
-
newValue: value
|
|
3800
|
+
newValue: isObject2(value) ? deepClone(value) : value
|
|
3801
3801
|
};
|
|
3802
3802
|
emit?.(event);
|
|
3803
3803
|
if (isObject2(oldValue) && oldValue !== value) {
|
|
@@ -3927,7 +3927,7 @@ function reactive(obj, emit, path = [], options) {
|
|
|
3927
3927
|
action: "set",
|
|
3928
3928
|
path: newPath,
|
|
3929
3929
|
oldValue,
|
|
3930
|
-
newValue: value
|
|
3930
|
+
newValue: isObject3(value) ? deepClone(value) : value
|
|
3931
3931
|
};
|
|
3932
3932
|
emit?.(event);
|
|
3933
3933
|
trigger(target, prop);
|
package/dist/index.js
CHANGED
|
@@ -3233,7 +3233,7 @@ function wrapMap(map, emit, path = []) {
|
|
|
3233
3233
|
path: cachedPath,
|
|
3234
3234
|
key,
|
|
3235
3235
|
oldValue,
|
|
3236
|
-
newValue: value2
|
|
3236
|
+
newValue: value2 !== null && typeof value2 === "object" ? deepClone(value2) : value2
|
|
3237
3237
|
};
|
|
3238
3238
|
emit?.(event);
|
|
3239
3239
|
if (!existed) {
|
|
@@ -3735,7 +3735,7 @@ function wrapArray(arr, emit, path = []) {
|
|
|
3735
3735
|
action: "set",
|
|
3736
3736
|
path: newPath,
|
|
3737
3737
|
oldValue,
|
|
3738
|
-
newValue: value
|
|
3738
|
+
newValue: isObject2(value) ? deepClone(value) : value
|
|
3739
3739
|
};
|
|
3740
3740
|
emit?.(event);
|
|
3741
3741
|
if (isObject2(oldValue) && oldValue !== value) {
|
|
@@ -3865,7 +3865,7 @@ function reactive(obj, emit, path = [], options) {
|
|
|
3865
3865
|
action: "set",
|
|
3866
3866
|
path: newPath,
|
|
3867
3867
|
oldValue,
|
|
3868
|
-
newValue: value
|
|
3868
|
+
newValue: isObject3(value) ? deepClone(value) : value
|
|
3869
3869
|
};
|
|
3870
3870
|
emit?.(event);
|
|
3871
3871
|
trigger(target, prop);
|