File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
components/remote_retrieval Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff 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} ;
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments