diff options
| author | Zog | 2017-12-28 14:59:02 +0100 |
|---|---|---|
| committer | Zog | 2017-12-28 14:59:02 +0100 |
| commit | 13e32eb8bf5d8a08583ffa8659a9c7f935076224 (patch) | |
| tree | 78f9f3f158b06972ec96c33d6f655dab29d0bdfb | |
| parent | e20ce60629e91c63d75701651c117177ce02aced (diff) | |
| download | chouette-core-13e32eb8bf5d8a08583ffa8659a9c7f935076224.tar.bz2 | |
Refs #5407; Fix editor when the current organisation does not have the purchase_windows featurefix-vehicle-journeys-editor
| -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) |
