summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 // [] }
)
{