diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-06 21:41:22 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-06 21:41:22 +0200 |
commit | c38b7643f85c9530ab2e3ad101be3ce130fadb86 (patch) | |
tree | 1f74be10c7a096e911cc28ef5b47d6fa30de4e26 /lib/Travel/Status/DE/DBWagenreihung.pm | |
parent | 5b388937648aa4aa6696020798d06601b91c2648 (diff) |
wagons: Do not crash on empty response
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm')
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung.pm | 2 |
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} ) { |