summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-06 21:41:22 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-06 21:41:22 +0200
commitc38b7643f85c9530ab2e3ad101be3ce130fadb86 (patch)
tree1f74be10c7a096e911cc28ef5b47d6fa30de4e26 /lib
parent5b388937648aa4aa6696020798d06601b91c2648 (diff)
wagons: Do not crash on empty response
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index ba5fe59..6ded3ca 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -305,7 +305,7 @@ sub wagons {
);
}
}
- if ( @{ $self->{wagons} } > 1 ) {
+ if ( @{ $self->{wagons} // [] } > 1 ) {
if ( $self->{wagons}[0]->{position}{start_percent}
> $self->{wagons}[-1]->{position}{start_percent} )
{