@azrico/webobject 1.4.190 → 1.4.191
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.
- package/dist/src/WebObjects/WebObject.js +18 -10
- package/package.json +1 -1
|
@@ -1272,6 +1272,7 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1272
1272
|
fetchID,
|
|
1273
1273
|
res,
|
|
1274
1274
|
params,
|
|
1275
|
+
usepath,
|
|
1275
1276
|
_args23 = arguments;
|
|
1276
1277
|
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1277
1278
|
while (1) switch (_context23.prev = _context23.next) {
|
|
@@ -1291,31 +1292,38 @@ var WebObject = exports.WebObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
1291
1292
|
params = {};
|
|
1292
1293
|
params.context = readonly ? "view" : "edit";
|
|
1293
1294
|
_context23.t0 = _typeof(search);
|
|
1294
|
-
_context23.next = _context23.t0 === "string" ? 11 : _context23.t0 === "number" ? 11 : _context23.t0 === "object" ?
|
|
1295
|
+
_context23.next = _context23.t0 === "string" ? 11 : _context23.t0 === "number" ? 11 : _context23.t0 === "object" ? 22 : 22;
|
|
1295
1296
|
break;
|
|
1296
1297
|
case 11:
|
|
1297
1298
|
search = String(search);
|
|
1298
1299
|
_context23.next = 14;
|
|
1299
|
-
return
|
|
1300
|
+
return _WebObjectPathHelper["default"].get_path(this, "get");
|
|
1301
|
+
case 14:
|
|
1302
|
+
_context23.t1 = _context23.sent;
|
|
1303
|
+
_context23.t2 = _context23.t1 + "/";
|
|
1304
|
+
_context23.t3 = search;
|
|
1305
|
+
usepath = _context23.t2 + _context23.t3;
|
|
1306
|
+
_context23.next = 20;
|
|
1307
|
+
return _global.gfunc.run_action("get", usepath, params, {
|
|
1300
1308
|
fetchID: fetchID
|
|
1301
1309
|
});
|
|
1302
|
-
case
|
|
1310
|
+
case 20:
|
|
1303
1311
|
res = _context23.sent;
|
|
1304
|
-
return _context23.abrupt("break",
|
|
1305
|
-
case
|
|
1306
|
-
_context23.next =
|
|
1312
|
+
return _context23.abrupt("break", 26);
|
|
1313
|
+
case 22:
|
|
1314
|
+
_context23.next = 24;
|
|
1307
1315
|
return this.get_list(search, readonly, fetchID);
|
|
1308
|
-
case
|
|
1316
|
+
case 24:
|
|
1309
1317
|
res = _context23.sent;
|
|
1310
|
-
return _context23.abrupt("break",
|
|
1311
|
-
case
|
|
1318
|
+
return _context23.abrupt("break", 26);
|
|
1319
|
+
case 26:
|
|
1312
1320
|
if (res) res = (0, _object.array_first)(res);
|
|
1313
1321
|
if (!(0, _object.object_isEmpty)(res)) {
|
|
1314
1322
|
res = this.ensure(this, res);
|
|
1315
1323
|
WebObject.setReadonly(res, readonly);
|
|
1316
1324
|
}
|
|
1317
1325
|
return _context23.abrupt("return", res);
|
|
1318
|
-
case
|
|
1326
|
+
case 29:
|
|
1319
1327
|
case "end":
|
|
1320
1328
|
return _context23.stop();
|
|
1321
1329
|
}
|