@azrico/webobject 1.4.187 → 1.4.188

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.
@@ -1243,7 +1243,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1243
1243
  params = {};
1244
1244
  params.context = readonly ? "view" : "edit";
1245
1245
  _context22.t0 = _typeof(search);
1246
- _context22.next = _context22.t0 === "string" ? 11 : _context22.t0 === "number" ? 11 : _context22.t0 === "object" ? 17 : 17;
1246
+ _context22.next = _context22.t0 === "string" ? 11 : _context22.t0 === "number" ? 11 : _context22.t0 === "object" ? 16 : 16;
1247
1247
  break;
1248
1248
  case 11:
1249
1249
  search = String(search);
@@ -1253,20 +1253,21 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1253
1253
  });
1254
1254
  case 14:
1255
1255
  res = _context22.sent;
1256
- if (res) res = this.ensure(this, res);
1257
- return _context22.abrupt("break", 23);
1258
- case 17:
1259
- _context22.t1 = _object.array_first;
1260
- _context22.next = 20;
1256
+ return _context22.abrupt("break", 20);
1257
+ case 16:
1258
+ _context22.next = 18;
1261
1259
  return this.get_list(search, readonly, fetchID);
1260
+ case 18:
1261
+ res = _context22.sent;
1262
+ return _context22.abrupt("break", 20);
1262
1263
  case 20:
1263
- _context22.t2 = _context22.sent;
1264
- res = (0, _context22.t1)(_context22.t2);
1265
- return _context22.abrupt("break", 23);
1266
- case 23:
1267
- if (res) WebObject.setReadonly(res, readonly);
1264
+ if (res) res = (0, _object.array_first)(res);
1265
+ if (!(0, _object.object_isEmpty)(res)) {
1266
+ res = this.ensure(this, res);
1267
+ WebObject.setReadonly(res, readonly);
1268
+ }
1268
1269
  return _context22.abrupt("return", res);
1269
- case 25:
1270
+ case 23:
1270
1271
  case "end":
1271
1272
  return _context22.stop();
1272
1273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.187",
3
+ "version": "1.4.188",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",