@azrico/webobject 1.4.92 → 1.4.93

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.
@@ -509,7 +509,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
509
509
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
510
510
  while (1) switch (_context9.prev = _context9.next) {
511
511
  case 0:
512
- this.isDeleted = true;
512
+ if (this.isSaved) this.isDeleted = true;
513
513
  for (_len = _args9.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
514
514
  p[_key] = _args9[_key];
515
515
  }
@@ -331,17 +331,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
331
331
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
332
332
  while (1) switch (_context9.prev = _context9.next) {
333
333
  case 0:
334
- if (this.obj) {
335
- this.obj.isDeleted = true;
336
- }
337
- _context9.next = 3;
334
+ _context9.next = 2;
338
335
  return this.event_run("on_delete");
339
- case 3:
340
- _context9.next = 5;
336
+ case 2:
337
+ _context9.next = 4;
341
338
  return this.event_run("on_after_delete");
342
- case 5:
339
+ case 4:
343
340
  return _context9.abrupt("return", true);
344
- case 6:
341
+ case 5:
345
342
  case "end":
346
343
  return _context9.stop();
347
344
  }
@@ -355,17 +352,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
355
352
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
356
353
  while (1) switch (_context10.prev = _context10.next) {
357
354
  case 0:
358
- if (this.obj && this.isSaved) {
359
- this.obj.isArchived = true;
360
- }
361
- _context10.next = 3;
355
+ _context10.next = 2;
362
356
  return this.event_run("on_archive");
363
- case 3:
364
- _context10.next = 5;
357
+ case 2:
358
+ _context10.next = 4;
365
359
  return this.event_run("on_after_archive");
366
- case 5:
360
+ case 4:
367
361
  return _context10.abrupt("return", true);
368
- case 6:
362
+ case 5:
369
363
  case "end":
370
364
  return _context10.stop();
371
365
  }
@@ -379,17 +373,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
379
373
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
380
374
  while (1) switch (_context11.prev = _context11.next) {
381
375
  case 0:
382
- if (this.obj && this.isSaved) {
383
- this.obj.isArchived = false;
384
- }
385
- _context11.next = 3;
376
+ _context11.next = 2;
386
377
  return this.event_run("on_unarchive");
387
- case 3:
388
- _context11.next = 5;
378
+ case 2:
379
+ _context11.next = 4;
389
380
  return this.event_run("on_after_unarchive");
390
- case 5:
381
+ case 4:
391
382
  return _context11.abrupt("return", true);
392
- case 6:
383
+ case 5:
393
384
  case "end":
394
385
  return _context11.stop();
395
386
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.92",
3
+ "version": "1.4.93",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",