summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 10:47:39 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 10:47:39 +0200
commitd189f6f0d2c1a0772994c3a4cd1e146204dd5a98 (patch)
tree6afccd87000530f01a10a5350bf0b520af5efbe6 /lib/Travelynx
parentd26953d13e9bb5a148581cb60b3333b7adad5565 (diff)
get_travel_distance: no need for debug output if there is no polyline
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm6
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 // [] }
)
{