summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-25 03:48:48 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-25 03:48:48 +0100
commit8c6cdc99a5c360fb2dab29ea8c2f8c2f35ba76d9 (patch)
treea74f1b88dc0dae70022c8fd3f3419a3aa8046d8a
parentb166507610b28ed70107790d44a85c838c26fda1 (diff)
journey: handle undefined route_(dep|arr)_index
-rw-r--r--templates/journey.html.ep4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index 09ad76d..ba5951e 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -259,10 +259,10 @@
% my $at_startstop = 0;
% my $i = 0;
% for my $station (@{$journey->{route}}) {
- % if ($i == $journey->{route_dep_index}) {
+ % if (defined $journey->{route_dep_index} and $i == $journey->{route_dep_index}) {
% $within = 1; $at_startstop = 1;
% }
- % elsif ($i == $journey->{route_arr_index}) {
+ % elsif (defined $journey->{route_arr_index} and $i == $journey->{route_arr_index}) {
% $within = 0; $at_startstop = 1;
% }
% else {