Skip to content

Commit 04515dc

Browse files
committed
updates
1 parent 36fc5fc commit 04515dc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

components/remote_retrieval/actions/get-orders/get-orders.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ export default {
1313
const response = await this.app.getOrders({
1414
$,
1515
});
16-
$.export("$summary", `Successfully retrieved ${response.results.length} orders`);
16+
if (response?.results?.length) {
17+
$.export("$summary", `Successfully retrieved ${response.results.length} orders`);
18+
}
1719
return response;
1820
},
1921
};

components/remote_retrieval/remote_retrieval.app.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export default {
1212
async options() {
1313
const response = await this.getOrders();
1414
const orderIds = response.results;
15-
return orderIds.map(({
15+
return orderIds?.map(({
1616
order_id, employee_info,
1717
}) => ({
1818
value: order_id,
1919
label: employee_info.name,
20-
}));
20+
})) || [];
2121
},
2222
},
2323
typeOfEquipment: {
@@ -133,7 +133,7 @@ export default {
133133
methods: {
134134
_baseUrl() {
135135
// return "https://remoteretrieval.com/RR-enterprise/remoteretrieval/public/index.php/api/v1";
136-
return "https://remoteretrieval.com/api/v1"
136+
return "https://remoteretrieval.com/api/v1";
137137
},
138138
async _makeRequest(opts = {}) {
139139
const {

0 commit comments

Comments
 (0)