@azrico/webobject 1.5.12 → 1.5.13

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.
@@ -1331,7 +1331,6 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1331
1331
  fetchID,
1332
1332
  res,
1333
1333
  params,
1334
- usepath,
1335
1334
  _args24 = arguments;
1336
1335
  return _regeneratorRuntime().wrap(function _callee24$(_context24) {
1337
1336
  while (1) switch (_context24.prev = _context24.next) {
@@ -1351,38 +1350,38 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
1351
1350
  params = {};
1352
1351
  params.__context = readonly ? "view" : "edit";
1353
1352
  _context24.t0 = _typeof(search);
1354
- _context24.next = _context24.t0 === "string" ? 11 : _context24.t0 === "number" ? 11 : _context24.t0 === "object" ? 22 : 22;
1353
+ _context24.next = _context24.t0 === "string" ? 11 : _context24.t0 === "number" ? 11 : _context24.t0 === "object" ? 16 : 16;
1355
1354
  break;
1356
1355
  case 11:
1357
1356
  search = String(search);
1357
+ // const usepath =
1358
+ // (await WebObjectPathHelper.get_path(this, "get")) +
1359
+ // "/" +
1360
+ // search;
1361
+ // res = await gfunc.run_action("get", usepath, params, {
1362
+ // fetchID: fetchID,
1363
+ // });
1358
1364
  _context24.next = 14;
1359
- return _WebObjectPathHelper["default"].get_path(this, "get");
1365
+ return this.get_list({
1366
+ __searchid: search
1367
+ }, readonly, fetchID);
1360
1368
  case 14:
1361
- _context24.t1 = _context24.sent;
1362
- _context24.t2 = _context24.t1 + "/";
1363
- _context24.t3 = search;
1364
- usepath = _context24.t2 + _context24.t3;
1365
- _context24.next = 20;
1366
- return _global.gfunc.run_action("get", usepath, params, {
1367
- fetchID: fetchID
1368
- });
1369
- case 20:
1370
1369
  res = _context24.sent;
1371
- return _context24.abrupt("break", 26);
1372
- case 22:
1373
- _context24.next = 24;
1370
+ return _context24.abrupt("break", 20);
1371
+ case 16:
1372
+ _context24.next = 18;
1374
1373
  return this.get_list(search, readonly, fetchID);
1375
- case 24:
1374
+ case 18:
1376
1375
  res = _context24.sent;
1377
- return _context24.abrupt("break", 26);
1378
- case 26:
1376
+ return _context24.abrupt("break", 20);
1377
+ case 20:
1379
1378
  if (res) res = (0, _object.array_first)(res);
1380
1379
  if (!(0, _object.object_isEmpty)(res)) {
1381
1380
  res = this.ensure(this, res);
1382
1381
  WebObject.setReadonly(res, readonly);
1383
1382
  }
1384
1383
  return _context24.abrupt("return", res);
1385
- case 29:
1384
+ case 23:
1386
1385
  case "end":
1387
1386
  return _context24.stop();
1388
1387
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.5.12",
3
+ "version": "1.5.13",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",