@azrico/webobject 1.4.149 → 1.4.150
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.
|
@@ -167,8 +167,7 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
|
|
|
167
167
|
return _context.abrupt("return", false);
|
|
168
168
|
case 7:
|
|
169
169
|
isValueChanged = false;
|
|
170
|
-
|
|
171
|
-
_context.prev = 9;
|
|
170
|
+
/* --------------------------- set if not changed --------------------------- */
|
|
172
171
|
oldval = this.getValue(key);
|
|
173
172
|
if (!(0, _object.object_equals)(oldval, value, {
|
|
174
173
|
strictArrayCheck: true,
|
|
@@ -177,29 +176,21 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
|
|
|
177
176
|
_classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, value);
|
|
178
177
|
isValueChanged = true;
|
|
179
178
|
} else isValueChanged = false;
|
|
180
|
-
|
|
181
|
-
break;
|
|
182
|
-
case 14:
|
|
183
|
-
_context.prev = 14;
|
|
184
|
-
_context.t0 = _context["catch"](9);
|
|
185
|
-
console.error("setValue failed", _context.t0);
|
|
186
|
-
case 17:
|
|
187
|
-
_context.prev = 17;
|
|
179
|
+
/* --------------------------------- notify --------------------------------- */
|
|
188
180
|
if (!(shouldNotify === true || shouldNotify === "auto" && isValueChanged)) {
|
|
189
|
-
_context.next =
|
|
181
|
+
_context.next = 13;
|
|
190
182
|
break;
|
|
191
183
|
}
|
|
192
|
-
_context.next =
|
|
184
|
+
_context.next = 13;
|
|
193
185
|
return this.notifyChanged("", key, value);
|
|
194
|
-
case
|
|
195
|
-
|
|
196
|
-
case 22:
|
|
186
|
+
case 13:
|
|
187
|
+
console.log("setValue", key, value, isValueChanged);
|
|
197
188
|
return _context.abrupt("return", isValueChanged);
|
|
198
|
-
case
|
|
189
|
+
case 15:
|
|
199
190
|
case "end":
|
|
200
191
|
return _context.stop();
|
|
201
192
|
}
|
|
202
|
-
}, _callee, this
|
|
193
|
+
}, _callee, this);
|
|
203
194
|
}));
|
|
204
195
|
function setValue(_x, _x2) {
|
|
205
196
|
return _setValue.apply(this, arguments);
|