summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-28 15:55:53 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-28 15:55:53 +0200
commitfa0624eb41d0daf889e987ceab729c19b544a2bb (patch)
tree1a642b02543f3a1fca3df470f21f4322269e5964
parentd854bdd7c4146a223e3c94aa123da8d41e5a6c84 (diff)
carriage formation preview: fix direction == 0
-rw-r--r--templates/_train_details.html.ep2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 709a1ac..d70ef30 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -119,7 +119,7 @@
% if (my $wr = $departure->{wr}) {
<div class="wagonorder-preview">
% my @wagons = $wr->wagons;
-% my $direction = $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{};
+% my $direction = defined $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{};
% if ($departure->{direction}) {
% $direction = $departure->{direction} eq 'l' ? '◀' : '▶';
% if (($departure->{direction} eq 'l' ? 0 : 100) != $wr->direction) {