@itilite/iui-user-management 0.3.14 → 0.3.15

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.
@@ -745,34 +745,33 @@ var airlineOptionsfn = function airlineOptionsfn(search, loadedOptions, _ref6) {
745
745
  headers: {
746
746
  Authorization: 'Bearer ' + token
747
747
  }
748
- }).then(function (res) {
749
- return res.data;
750
748
  })).then(function (response) {
751
- return Promise.resolve(response.results.map(function (item) {
749
+ var mappedValue = response.data.results.map(function (item) {
752
750
  return {
753
751
  value: item.id,
754
752
  label: item.name
755
753
  };
756
- })).then(function (mappedValue) {
757
- if (placeholder) {
758
- var placeholderLbl = {
759
- value: '',
760
- label: placeholder
761
- };
762
- mappedValue.unshift(placeholderLbl);
763
- }
754
+ });
764
755
 
765
- return {
766
- options: mappedValue,
767
- hasMore: !!response.data.next,
768
- additional: {
769
- page: page + 1,
770
- placeholder: placeholder
771
- }
756
+ if (placeholder) {
757
+ var placeholderLbl = {
758
+ value: '',
759
+ label: placeholder
772
760
  };
773
- });
761
+ mappedValue.unshift(placeholderLbl);
762
+ }
763
+
764
+ return {
765
+ options: mappedValue,
766
+ hasMore: !!response.data.next,
767
+ additional: {
768
+ page: page + 1,
769
+ placeholder: placeholder
770
+ }
771
+ };
774
772
  });
775
- }, function () {
773
+ }, function (error) {
774
+ console.log(error);
776
775
  return {
777
776
  options: [],
778
777
  hasMore: false,