@azrico/webobject 1.5.44 → 1.5.45
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.
|
@@ -590,7 +590,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
590
590
|
case 0:
|
|
591
591
|
_parseObj = function _parseObj3() {
|
|
592
592
|
_parseObj = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(key, obj) {
|
|
593
|
-
var _p, keydot, child_changeableKeys, newobj_dlt;
|
|
593
|
+
var _p, _child_changeableKeys, keydot, child_changeableKeys, newobj_dlt;
|
|
594
594
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
595
595
|
while (1) switch (_context12.prev = _context12.next) {
|
|
596
596
|
case 0:
|
|
@@ -628,7 +628,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
628
628
|
return _context12.abrupt("return", _context12.sent);
|
|
629
629
|
case 6:
|
|
630
630
|
if (!(obj instanceof WebObject && typeof obj.get_deltaObject === "function")) {
|
|
631
|
-
_context12.next =
|
|
631
|
+
_context12.next = 18;
|
|
632
632
|
break;
|
|
633
633
|
}
|
|
634
634
|
/* -------------------- parse changeableKeys for children -------------------- */
|
|
@@ -637,24 +637,33 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
637
637
|
return s.startsWith(keydot);
|
|
638
638
|
}).map(function (r) {
|
|
639
639
|
return r.substring(keydot.length);
|
|
640
|
-
});
|
|
641
|
-
|
|
640
|
+
});
|
|
641
|
+
/**
|
|
642
|
+
* if no key is set for children consider it as undefined
|
|
643
|
+
* if we send the empty array to get_delta we get no keys
|
|
644
|
+
*/
|
|
645
|
+
if (child_changeableKeys == null || ((_child_changeableKeys = child_changeableKeys) === null || _child_changeableKeys === void 0 ? void 0 : _child_changeableKeys.length) === 0) {
|
|
646
|
+
child_changeableKeys = undefined;
|
|
647
|
+
}
|
|
648
|
+
/* -------------------------------------------------------------------------- */
|
|
649
|
+
//child elements have different kind of delta
|
|
650
|
+
_context12.next = 12;
|
|
642
651
|
return obj.get_deltaObject(_objectSpread(_objectSpread({}, p), {}, {
|
|
643
652
|
isChild: true,
|
|
644
653
|
changeableKeys: child_changeableKeys
|
|
645
654
|
}));
|
|
646
|
-
case
|
|
655
|
+
case 12:
|
|
647
656
|
newobj_dlt = _context12.sent;
|
|
648
657
|
if ((0, _object.object_isEmpty)(newobj_dlt)) {
|
|
649
|
-
_context12.next =
|
|
658
|
+
_context12.next = 17;
|
|
650
659
|
break;
|
|
651
660
|
}
|
|
652
661
|
return _context12.abrupt("return", newobj_dlt);
|
|
653
|
-
case 16:
|
|
654
|
-
return _context12.abrupt("return", obj);
|
|
655
662
|
case 17:
|
|
656
663
|
return _context12.abrupt("return", obj);
|
|
657
664
|
case 18:
|
|
665
|
+
return _context12.abrupt("return", obj);
|
|
666
|
+
case 19:
|
|
658
667
|
case "end":
|
|
659
668
|
return _context12.stop();
|
|
660
669
|
}
|