@viewfly/core 2.0.0-alpha.6 → 2.0.0-alpha.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.
@@ -1167,12 +1167,13 @@ class ObjectReactiveHandler {
1167
1167
  if (this.isReadonly && !fromInternalWrite) {
1168
1168
  throw reactiveErrorFn('Object is readonly!');
1169
1169
  }
1170
- newValue = toRaw(newValue);
1170
+ const rawValue = toRaw(newValue);
1171
1171
  const oldValue = target[p];
1172
- if (oldValue === newValue) {
1173
- return Reflect.set(target, p, newValue, receiver);
1172
+ const v = this.isShallow ? newValue : rawValue;
1173
+ if (oldValue === rawValue) {
1174
+ return Reflect.set(target, p, v, receiver);
1174
1175
  }
1175
- const b = Reflect.set(target, p, newValue, receiver);
1176
+ const b = Reflect.set(target, p, v, receiver);
1176
1177
  fromInternalWrite = false;
1177
1178
  if (hasOwn(target, p)) {
1178
1179
  trigger(target, TriggerOpTypes.Set, p);
package/bundles/index.js CHANGED
@@ -1169,12 +1169,13 @@ class ObjectReactiveHandler {
1169
1169
  if (this.isReadonly && !fromInternalWrite) {
1170
1170
  throw reactiveErrorFn('Object is readonly!');
1171
1171
  }
1172
- newValue = toRaw(newValue);
1172
+ const rawValue = toRaw(newValue);
1173
1173
  const oldValue = target[p];
1174
- if (oldValue === newValue) {
1175
- return Reflect.set(target, p, newValue, receiver);
1174
+ const v = this.isShallow ? newValue : rawValue;
1175
+ if (oldValue === rawValue) {
1176
+ return Reflect.set(target, p, v, receiver);
1176
1177
  }
1177
- const b = Reflect.set(target, p, newValue, receiver);
1178
+ const b = Reflect.set(target, p, v, receiver);
1178
1179
  fromInternalWrite = false;
1179
1180
  if (hasOwn(target, p)) {
1180
1181
  trigger(target, exports.TriggerOpTypes.Set, p);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewfly/core",
3
- "version": "2.0.0-alpha.6",
3
+ "version": "2.0.0-alpha.7",
4
4
  "description": "Viewfly is a simple and easy-to-use JavaScript framework with an intuitive development experience.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -50,7 +50,7 @@
50
50
  "bugs": {
51
51
  "url": "https://github.com/viewfly/viewfly.git/issues"
52
52
  },
53
- "gitHead": "287516a11d9fddbe9f38c341e06d1b7256cfe7ac",
53
+ "gitHead": "b66ca589f7662cd518fc2e5955b3e3ff9de83f94",
54
54
  "dependencies": {
55
55
  "reflect-metadata": "^0.2.2"
56
56
  }