Skip to content
Snippets Groups Projects
Unverified Commit bc131026 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey: Deal with backends that do not provide a stopL (empty route)

parent be1be950
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,7 @@ sub new {
}
$ref->{is_additional} = $journey->{stbStop}{isAdd};
}
elsif ( $stops[0]{loc} ) {
elsif ( $stops[0] and $stops[0]{loc} ) {
$ref->{route_start} = $stops[0]{loc}->name;
}
......@@ -307,7 +307,7 @@ sub polyline {
sub route {
my ($self) = @_;
if ( $self->{route} ) {
if ( $self->{route} and @{ $self->{route} } ) {
if ( $self->{route}[0] and $self->{route}[0]{stop} ) {
$self->{route}
= [ map { Travel::Status::DE::HAFAS::Stop->new( %{$_} ) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment