diff options
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r-- | lib/Travel/Status/DE/HAFAS.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index 9d0a4cc..0489901 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -891,6 +891,11 @@ sub station { my @prefcounts = sort { $b->[0] <=> $a->[0] } map { [ $_, $prefc_by_loc{$_} ] } keys %prefc_by_loc; + if ( not @prefcounts ) { + $self->{station_info} = {}; + return $self->{station_info}; + } + my $loc = $locL[ $prefcounts[0][0] ]; if ($loc) { |