diff options
| author | Alban Peignier | 2017-12-28 15:01:42 +0100 |
|---|---|---|
| committer | GitHub | 2017-12-28 15:01:42 +0100 |
| commit | 0e9fa98fdc8d78ecf2b12921be785fb21465cda5 (patch) | |
| tree | 78f9f3f158b06972ec96c33d6f655dab29d0bdfb | |
| parent | e20ce60629e91c63d75701651c117177ce02aced (diff) | |
| parent | 13e32eb8bf5d8a08583ffa8659a9c7f935076224 (diff) | |
| download | chouette-core-0e9fa98fdc8d78ecf2b12921be785fb21465cda5.tar.bz2 | |
Merge pull request #192 from af83/fix-vehicle-journeys-editor
Fix vehicule journeys editor when the current organisaiton doesn't have the feature
| -rw-r--r-- | app/javascript/vehicle_journeys/actions/index.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js index 202c09440..a1a3ff68c 100644 --- a/app/javascript/vehicle_journeys/actions/index.js +++ b/app/javascript/vehicle_journeys/actions/index.js @@ -349,13 +349,15 @@ const actions = { color: tt.color }) } - for (tt of val.purchase_windows){ - purchaseWindows.push({ - objectid: tt.objectid, - name: tt.name, - id: tt.id, - color: tt.color - }) + if(val.purchase_windows){ + for (tt of val.purchase_windows){ + purchaseWindows.push({ + objectid: tt.objectid, + name: tt.name, + id: tt.id, + color: tt.color + }) + } } let vjasWithDelta = val.vehicle_journey_at_stops.map((vjas, i) => { actions.fillEmptyFields(vjas) |
