roboto-js 1.3.15 → 1.3.16
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/cjs/rbt_api.cjs +10 -4
- package/dist/esm/rbt_api.js +3 -0
- package/package.json +1 -1
- package/src/rbt_api.js +3 -0
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -494,17 +494,23 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
494
494
|
return this.load('<@filekit.file>', id);
|
|
495
495
|
case 3:
|
|
496
496
|
response = _context11.sent;
|
|
497
|
+
if (response) {
|
|
498
|
+
_context11.next = 6;
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
return _context11.abrupt("return", null);
|
|
502
|
+
case 6:
|
|
497
503
|
record = response.toRecord();
|
|
498
504
|
return _context11.abrupt("return", new _rbt_file["default"](record, this.axios, this.localDb));
|
|
499
|
-
case
|
|
500
|
-
_context11.prev =
|
|
505
|
+
case 10:
|
|
506
|
+
_context11.prev = 10;
|
|
501
507
|
_context11.t0 = _context11["catch"](0);
|
|
502
508
|
return _context11.abrupt("return", this._handleError(_context11.t0));
|
|
503
|
-
case
|
|
509
|
+
case 13:
|
|
504
510
|
case "end":
|
|
505
511
|
return _context11.stop();
|
|
506
512
|
}
|
|
507
|
-
}, _callee11, this, [[0,
|
|
513
|
+
}, _callee11, this, [[0, 10]]);
|
|
508
514
|
}));
|
|
509
515
|
function loadFile(_x7) {
|
|
510
516
|
return _loadFile.apply(this, arguments);
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -229,6 +229,9 @@ export default class RbtApi {
|
|
|
229
229
|
//return this.create('<@filekit.file>', dataHash);
|
|
230
230
|
try {
|
|
231
231
|
const response = await this.load('<@filekit.file>', id);
|
|
232
|
+
if (!response) {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
232
235
|
const record = response.toRecord();
|
|
233
236
|
return new RbtFile(record, this.axios, this.localDb);
|
|
234
237
|
} catch (e) {
|
package/package.json
CHANGED
package/src/rbt_api.js
CHANGED
|
@@ -283,6 +283,9 @@ export default class RbtApi {
|
|
|
283
283
|
//return this.create('<@filekit.file>', dataHash);
|
|
284
284
|
try {
|
|
285
285
|
const response = await this.load('<@filekit.file>', id);
|
|
286
|
+
if(!response){
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
286
289
|
const record = response.toRecord();
|
|
287
290
|
return new RbtFile(record, this.axios, this.localDb);
|
|
288
291
|
|