diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-08-27 19:06:19 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-08-27 19:06:19 +0200 |
commit | 5192d997ded949df5fd81ff40f9a193ba806dc3b (patch) | |
tree | 81a29eea40aebc7cd57469b626f936d255deb945 /lib/Travelynx/Model/Journeys.pm | |
parent | 39fb04baf0f4ac4445ad8db6914740281265dace (diff) |
get_travel_distance: intermediate: Handle destination renames in sanity check2.8.35
Also related to #160
Diffstat (limited to 'lib/Travelynx/Model/Journeys.pm')
-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 ); |