From 8c6cdc99a5c360fb2dab29ea8c2f8c2f35ba76d9 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 25 Dec 2025 03:48:48 +0100 Subject: journey: handle undefined route_(dep|arr)_index --- templates/journey.html.ep | 4 ++-- 1 file 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 { -- cgit v1.2.3