diff options
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 79bc322..343d680 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1199,7 +1199,12 @@ sub get_travel_distance { = before_incl { ( $_->[1] and $_->[1] == $to_eva ) or $_->[0] eq $to } @route; - if ( @route < 2 or $route[-1][0] ne $to ) { + if ( + @route < 2 + or ( $route[-1][0] ne $to + and ( not $route[-1][1] or $route[-1][1] != $to_eva ) ) + ) + { # I AM ERROR return ( 0, 0, $distance_beeline ); |