diff options
| author | Zog | 2018-01-11 11:30:04 +0100 |
|---|---|---|
| committer | Zog | 2018-01-11 11:30:27 +0100 |
| commit | 25ddf5946b9e0e5412e6e0db5f0b6be264b59a72 (patch) | |
| tree | 2c57667fdc6074bfc2a149a23e7f5d051625015c | |
| parent | dec9361ab612597c827e1618998965eb38f41b9b (diff) | |
| download | chouette-core-25ddf5946b9e0e5412e6e0db5f0b6be264b59a72.tar.bz2 | |
Refs #5544; Fix bug preventing VJ creation
When the company has not been set
| -rw-r--r-- | app/javascript/vehicle_journeys/components/tools/CreateModal.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/vehicle_journeys/components/tools/CreateModal.js b/app/javascript/vehicle_journeys/components/tools/CreateModal.js index 9ab87af3f..07c684760 100644 --- a/app/javascript/vehicle_journeys/components/tools/CreateModal.js +++ b/app/javascript/vehicle_journeys/components/tools/CreateModal.js @@ -11,7 +11,7 @@ export default class CreateModal extends Component { handleSubmit() { if (actions.validateFields(...this.refs, $('.vjCreateSelectJP')[0]) && this.props.modal.modalProps.selectedJPModal) { - this.props.onAddVehicleJourney(this.refs, this.props.modal.modalProps.selectedJPModal, this.props.stopPointsList, this.props.modal.modalProps.vehicleJourney.company) + this.props.onAddVehicleJourney(this.refs, this.props.modal.modalProps.selectedJPModal, this.props.stopPointsList, this.props.modal.modalProps.vehicleJourney && this.props.modal.modalProps.vehicleJourney.company) this.props.onModalClose() $('#NewVehicleJourneyModal').modal('hide') } |
