@azrico/webobject 1.5.1 → 1.5.2

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.
@@ -62,9 +62,8 @@ export declare class SimpleObject extends MapableObject {
62
62
  * if the field is not in delta instantly calls the `apply` function to remove from delta
63
63
  * @param key
64
64
  * @param value
65
- * @param shouldNotify
66
65
  */
67
- setPreferApply(key: WriteablePropOf<this>, value: any, shouldNotify?: sendChangesType): Promise<boolean>;
66
+ setPreferApply(key: WriteablePropOf<this>, value: any): Promise<boolean>;
68
67
  /**
69
68
  * set value and run the event handlers if needed
70
69
  * @return true if changed , false otherwise
@@ -191,31 +191,26 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
191
191
  * if the field is not in delta instantly calls the `apply` function to remove from delta
192
192
  * @param key
193
193
  * @param value
194
- * @param shouldNotify
195
194
  */
196
195
  )
197
196
  }, {
198
197
  key: "setPreferApply",
199
198
  value: (function () {
200
199
  var _setPreferApply = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key, value) {
201
- var shouldNotify,
202
- keyExists,
203
- res,
204
- _args2 = arguments;
200
+ var keyExists, res;
205
201
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
206
202
  while (1) switch (_context2.prev = _context2.next) {
207
203
  case 0:
208
- shouldNotify = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : "auto";
209
204
  keyExists = key in this.__delta;
210
- _context2.next = 4;
211
- return this.set(key, value, shouldNotify);
212
- case 4:
205
+ _context2.next = 3;
206
+ return this.set(key, value, keyExists ? "auto" : false);
207
+ case 3:
213
208
  res = _context2.sent;
214
209
  if (!keyExists) {
215
210
  this.apply(key);
216
211
  }
217
212
  return _context2.abrupt("return", res);
218
- case 7:
213
+ case 6:
219
214
  case "end":
220
215
  return _context2.stop();
221
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",