@azrico/webobject 1.4.21 → 1.4.22
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.
|
@@ -419,6 +419,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
419
419
|
var _this$manager4;
|
|
420
420
|
var srObject,
|
|
421
421
|
_this$manager3,
|
|
422
|
+
srID,
|
|
422
423
|
_len3,
|
|
423
424
|
p,
|
|
424
425
|
_key3,
|
|
@@ -427,32 +428,39 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
427
428
|
while (1) switch (_context8.prev = _context8.next) {
|
|
428
429
|
case 0:
|
|
429
430
|
if (!this.isSaved) {
|
|
430
|
-
_context8.next =
|
|
431
|
+
_context8.next = 10;
|
|
431
432
|
break;
|
|
432
433
|
}
|
|
433
434
|
this.apply_changes();
|
|
434
435
|
srObject = this.getSaveResult(true);
|
|
435
436
|
if (!_classPrivateMethodGet(this, _isValidSR, _isValidSR2).call(this, srObject)) {
|
|
436
|
-
_context8.next =
|
|
437
|
+
_context8.next = 10;
|
|
437
438
|
break;
|
|
438
439
|
}
|
|
439
|
-
|
|
440
|
-
|
|
440
|
+
/* -------------------------------------------------------------------------- */
|
|
441
|
+
srID = srObject.insertedId || srObject._id;
|
|
442
|
+
if (srID) {
|
|
443
|
+
this._id = srID;
|
|
441
444
|
}
|
|
445
|
+
/* -------------------------------------------------------------------------- */
|
|
442
446
|
if (srObject._index_value && !Number.isNaN(srObject._index_value)) {
|
|
443
447
|
this._index_value = Number(srObject._index_value);
|
|
444
448
|
}
|
|
445
|
-
|
|
449
|
+
/* -------------------------------------------------------------------------- */
|
|
450
|
+
if (srObject._index_key) {
|
|
451
|
+
this._index_key = srObject._index_key;
|
|
452
|
+
}
|
|
453
|
+
_context8.next = 10;
|
|
446
454
|
return (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.event_run("on_id_change");
|
|
447
|
-
case
|
|
455
|
+
case 10:
|
|
448
456
|
for (_len3 = _args8.length, p = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
449
457
|
p[_key3] = _args8[_key3];
|
|
450
458
|
}
|
|
451
|
-
_context8.next =
|
|
459
|
+
_context8.next = 13;
|
|
452
460
|
return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.onSave.apply(_this$manager4, p);
|
|
453
|
-
case
|
|
461
|
+
case 13:
|
|
454
462
|
return _context8.abrupt("return", _context8.sent);
|
|
455
|
-
case
|
|
463
|
+
case 14:
|
|
456
464
|
case "end":
|
|
457
465
|
return _context8.stop();
|
|
458
466
|
}
|