summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm7
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 );