vbea пре 2 година
родитељ
комит
333b1c08dd
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      Strides-APP/app/pages/vouchers/VoucherDetails.js

+ 3 - 1
Strides-APP/app/pages/vouchers/VoucherDetails.js

@@ -10,7 +10,6 @@ import app from '../../../app.json';
 import apiVoucher from '../../api/apiVoucher';
 import Dialog from '../../components/Dialog';
 import utils from '../../utils/utils';
-import { PageList } from '../Router';
 
 export default class VoucherDetails extends Component {
   constructor(props) {
@@ -49,6 +48,9 @@ export default class VoucherDetails extends Component {
 
   getDaysText() {
     if (this.state.voucherInfo.eligibleForUsageOn) {
+      if (typeof this.state.voucherInfo.eligibleForUsageOn == 'string') {
+        this.state.voucherInfo.eligibleForUsageOn = this.state.voucherInfo.eligibleForUsageOn.split(",");
+      }
       return this.state.voucherInfo.eligibleForUsageOn.join(", ");
     } else {
       return "Every day";