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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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( %{$_} ) }