@azrico/webobject 1.5.51 → 1.5.53

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.
@@ -53,10 +53,12 @@ export declare class SimpleObject extends MapableObject {
53
53
  protected __saveResultObject?: any;
54
54
  protected __saveResultIsSuccess: boolean;
55
55
  protected __saveResultType?: saveResultType;
56
+ readonly __initialized?: boolean;
56
57
  _id: string;
57
58
  _index_key: string;
58
59
  _index_value: number;
59
60
  constructor(is_readonly?: boolean);
61
+ init(): void;
60
62
  get<MKey extends PropOf<this>>(key: MKey, original?: boolean): PropType<this, MKey>;
61
63
  get<MKey extends PropOnlyPrefixedOf<this>>(key: MKey, original?: boolean): any;
62
64
  /**
@@ -76,6 +76,8 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
76
76
  _defineProperty(_this, "__saveResultObject", void 0);
77
77
  _defineProperty(_this, "__saveResultIsSuccess", true);
78
78
  _defineProperty(_this, "__saveResultType", void 0);
79
+ //init function
80
+ _defineProperty(_this, "__initialized", void 0);
79
81
  //id in the database
80
82
  _defineProperty(_this, "_id", "");
81
83
  //sequence key (usually managed by the database)
@@ -117,6 +119,11 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
117
119
  value: function _static() {
118
120
  return this.constructor;
119
121
  }
122
+ }, {
123
+ key: "init",
124
+ value: function init() {
125
+ this.__initialized = true;
126
+ }
120
127
  }, {
121
128
  key: "get",
122
129
  value: function get(key) {
@@ -1518,7 +1525,7 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
1518
1525
  var varKeys = ["products", "variations"];
1519
1526
  for (var _i = 0, _varKeys = varKeys; _i < _varKeys.length; _i++) {
1520
1527
  var vk = _varKeys[_i];
1521
- if (!(vk in result_object)) continue;
1528
+ if (!(vk in result_object) || (0, _object.array_isEmpty)(result_object[vk])) continue;
1522
1529
  /**
1523
1530
  * if one product is not valid the result is not valid
1524
1531
  * but if all products are valid we still need to check the object itself
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.5.51",
3
+ "version": "1.5.53",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",