aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-01-19 15:44:36 +0100
committerZog2018-01-19 15:44:36 +0100
commit889700f25e60bd37ae5553216862ac3b7d43400e (patch)
tree077dede2176ced46856f97d58f42bddfa22e0a89
parent64caaf63e8e566dd448d9ceca995829b8630b98f (diff)
downloadchouette-core-889700f25e60bd37ae5553216862ac3b7d43400e.tar.bz2
Fix bug on VJ index when no JP is selected
-rw-r--r--app/views/vehicle_journeys/index.html.slim2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/vehicle_journeys/index.html.slim b/app/views/vehicle_journeys/index.html.slim
index 2c7a3b97d..a02d5ed38 100644
--- a/app/views/vehicle_journeys/index.html.slim
+++ b/app/views/vehicle_journeys/index.html.slim
@@ -17,7 +17,7 @@
= javascript_tag do
| window.route_id = #{params[:route_id]};
| window.stopPoints = #{(@stop_points_list.to_json).html_safe};
- | window.jpOrigin = #{(@jp_origin.attributes.update({full_schedule: @jp_origin.full_schedule?}).to_json).html_safe};
+ | window.jpOrigin = #{(@jp_origin.present? ? @jp_origin.attributes.update({full_schedule: @jp_origin.full_schedule?}).to_json : "").html_safe};
| window.jpOriginStopPoints = #{(@jp_origin_stop_points.to_json).html_safe};
| window.transportMode = #{(@transport_mode.to_json).html_safe};
| window.transportSubmode = #{(@transport_submode.to_json).html_safe};