aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlban Peignier2018-01-10 22:03:09 +0100
committerGitHub2018-01-10 22:03:09 +0100
commit21ab06ce232b41e4582b4339c872c423b36115d3 (patch)
tree9789b20ad7600f6c50be2d250eaeaeef7efe5980 /app
parentb2cf5912be904000bed0dd8db14f17c119994d11 (diff)
parent071bfaf78735b18d5dcc7f6fa31005be42a719ac (diff)
downloadchouette-core-21ab06ce232b41e4582b4339c872c423b36115d3.tar.bz2
Merge pull request #218 from af83/5520-fix-company-in-vjs-editor
Fix company in vjs editor. Refs #5520
Diffstat (limited to 'app')
-rw-r--r--app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js
index 36dbb98d5..08d74baba 100644
--- a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js
+++ b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js
@@ -10,14 +10,12 @@ export default class EditVehicleJourney extends Component {
handleSubmit() {
if(actions.validateFields(this.refs) == true) {
- var company;
+ var company = undefined
if(this.props.modal.modalProps.selectedCompany) {
company = this.props.modal.modalProps.selectedCompany
- } else if (typeof this.props.modal.modalProps.vehicleJourney.company === Object) {
+ } else if (typeof this.props.modal.modalProps.vehicleJourney.company === "object") {
company = this.props.modal.modalProps.vehicleJourney.company
- } else {
- company = undefined
- }
+ }
this.props.onEditVehicleJourney(this.refs, company)
this.props.onModalClose()
$('#EditVehicleJourneyModal').modal('hide')