@azrico/webobject 1.4.102 → 1.4.103

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.
@@ -1249,19 +1249,21 @@ function _getSubProperty2(key, subkey) {
1249
1249
  return subobj[subkey];
1250
1250
  }
1251
1251
  function _setProperty2(key, value) {
1252
- if (this[key] === value) {
1253
- /**
1254
- * We set something back to its original value so no need to save it as Delta
1255
- */
1256
- delete this.__delta[key];
1257
- return false;
1258
- } else {
1252
+ if (!this.__use_delta) {
1253
+ this[key] = value; //on noDelta mode, also update the obj
1259
1254
  this.__delta[key] = value; //always update delta to keep track of changes
1260
- if (!this.__use_delta) {
1261
- this[key] = value; //on noDelta mode, also update the obj
1262
- }
1263
-
1264
1255
  return true;
1256
+ } else {
1257
+ if (this[key] === value) {
1258
+ /**
1259
+ * We set something back to its original value so no need to save it as Delta
1260
+ */
1261
+ delete this.__delta[key];
1262
+ return false;
1263
+ } else {
1264
+ this.__delta[key] = value; //always update delta to keep track of changes
1265
+ return true;
1266
+ }
1265
1267
  }
1266
1268
  }
1267
1269
  function _setDefaultProperty2(key, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.102",
3
+ "version": "1.4.103",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",