Loading lib/Travelynx/Model/Journeys.pm +5 −1 Original line number Diff line number Diff line Loading @@ -1355,7 +1355,7 @@ sub get_travel_distance { } @{$route_ref}; if ( not defined $route_start and defined $route_end ) { if ( not( defined $route_start and defined $route_end ) ) { return ( 0, 0, $distance_beeline ); } Loading Loading @@ -1384,6 +1384,10 @@ sub get_travel_distance { my @route = @{$route_ref}[ $route_start .. $route_end ]; if ( not @route ) { return ( 0, 0, $distance_beeline ); } # Just like the route, the polyline may contain the same stop more than # once. So we need to select based on the seen counter. my $poly_start = first_index { Loading Loading
lib/Travelynx/Model/Journeys.pm +5 −1 Original line number Diff line number Diff line Loading @@ -1355,7 +1355,7 @@ sub get_travel_distance { } @{$route_ref}; if ( not defined $route_start and defined $route_end ) { if ( not( defined $route_start and defined $route_end ) ) { return ( 0, 0, $distance_beeline ); } Loading Loading @@ -1384,6 +1384,10 @@ sub get_travel_distance { my @route = @{$route_ref}[ $route_start .. $route_end ]; if ( not @route ) { return ( 0, 0, $distance_beeline ); } # Just like the route, the polyline may contain the same stop more than # once. So we need to select based on the seen counter. my $poly_start = first_index { Loading