From ba1429382f8e0521d5c454f4ff9dc32868a1a935 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Sep 2020 22:24:42 +0200 Subject: _map_infobox: Fix crash when arrival is undefined (e.g. due to cancellation) --- templates/_map_infobox.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/_map_infobox.html.ep b/templates/_map_infobox.html.ep index 8f66a6f..f1da392 100644 --- a/templates/_map_infobox.html.ep +++ b/templates/_map_infobox.html.ep @@ -37,7 +37,7 @@ data-poly="<%= stash('ajax_polyline') %>" %= sprintf('(%+d)', $next->{station}{arr_delay}) % } % } - % elsif ($next->{type} eq 'present') { + % elsif ($next->{type} eq 'present' and $next->{station}{arr}) { Zug steht in <%= $next->{station}{arr}->strftime('%H:%M') %> auf Gleis <%= $next->{station}{platform} %> -- cgit v1.2.3