summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index dbe708e..7be8410 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -166,7 +166,13 @@ sub new {
}
if ( $journey->{stbStop} ) {
- shift(@stops);
+ if ( $hafas->{arrivals} ) {
+ $route_end = $stops[0]->{name};
+ pop(@stops);
+ }
+ else {
+ shift(@stops);
+ }
}
my $ref = {