summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-08-12 17:27:58 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-08-12 17:27:58 +0200
commit7d37905add82ce990c69e598f919edbf51c345bf (patch)
treeed45c262b9f2621ccd8ccd269188522e853f0916
parent342f1bc29510ff266436d9c0c1301b90530b2270 (diff)
work: journey->type may be undefHEAD2.16.5main
-rw-r--r--lib/Travelynx/Command/work.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm
index 18584ed..ad21d53 100644
--- a/lib/Travelynx/Command/work.pm
+++ b/lib/Travelynx/Command/work.pm
@@ -460,8 +460,9 @@ sub run {
is_departure => 1,
eva => $dep,
datetime => $found_dep->sched_dep,
- train_type => $journey->type =~ s{ +$}{}r,
- train_no => $journey->number,
+ train_type => ( $journey->type // q{} )
+ =~ s{ +$}{}r,
+ train_no => $journey->number,
);
$self->app->add_stationinfo( $uid, 1,
$journey->id, $found_dep->loc->eva );