diff options
| author | Zog | 2018-04-11 16:22:22 +0200 |
|---|---|---|
| committer | Zog | 2018-04-11 16:22:22 +0200 |
| commit | 61130315087432434fbbae50d30ad1753ff596a8 (patch) | |
| tree | b1976594f2a074961c331fead0fc25c8298e98ec /app/javascript/vehicle_journeys | |
| parent | 2d1ebb630ecfdd7b745571202ee60a35902b545f (diff) | |
| download | chouette-core-ie-fixes.tar.bz2 | |
Make ReactJS views IE-compliant :firework:ie-fixes
Diffstat (limited to 'app/javascript/vehicle_journeys')
| -rw-r--r-- | app/javascript/vehicle_journeys/actions/index.js | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js index 537dcfc06..d51012cdb 100644 --- a/app/javascript/vehicle_journeys/actions/index.js +++ b/app/javascript/vehicle_journeys/actions/index.js @@ -1,9 +1,3 @@ -import Promise from 'promise-polyfill' - -// To add to window -if (!window.Promise) { - window.Promise = Promise; -} import { batchActions } from '../batch' const actions = { @@ -339,16 +333,23 @@ const actions = { if(hasError == true) { dispatch(actions.unavailableServer()) } else { - let val - for (val of json.vehicle_journeys){ + let i = 0 + while(i < json.vehicle_journeys.length){ + let val = json.vehicle_journeys[i] + i++ var timeTables = [] var purchaseWindows = [] - let tt - for (tt of val.time_tables){ + let k = 0 + while(k < val.time_tables.length){ + let tt = val.time_tables[k] + k++ timeTables.push(tt) } if(val.purchase_windows){ - for (tt of val.purchase_windows){ + k = 0 + while(k < val.purchase_windows.length){ + let tt = val.purchase_windows[k] + k++ purchaseWindows.push(tt) } } |
