diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-08-25 10:47:39 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-08-25 10:47:39 +0200 |
commit | d189f6f0d2c1a0772994c3a4cd1e146204dd5a98 (patch) | |
tree | 6afccd87000530f01a10a5350bf0b520af5efbe6 /lib | |
parent | d26953d13e9bb5a148581cb60b3333b7adad5565 (diff) |
get_travel_distance: no need for debug output if there is no polyline
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 8a97aef..e00c844 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1154,7 +1154,8 @@ sub get_travel_distance { # Work around inconsistencies caused by a multiple EVA IDs mapping to the same station name if ( - not List::MoreUtils::any { $_->[2] and $_->[2] == $from_eva } + @{ $polyline_ref // [] } + and not List::MoreUtils::any { $_->[2] and $_->[2] == $from_eva } @{ $polyline_ref // [] } ) { @@ -1170,7 +1171,8 @@ sub get_travel_distance { } } if ( - not List::MoreUtils::any { $_->[2] and $_->[2] == $to_eva } + @{ $polyline_ref // [] } + and not List::MoreUtils::any { $_->[2] and $_->[2] == $to_eva } @{ $polyline_ref // [] } ) { |