From d189f6f0d2c1a0772994c3a4cd1e146204dd5a98 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 25 Aug 2024 10:47:39 +0200 Subject: get_travel_distance: no need for debug output if there is no polyline --- lib/Travelynx/Model/Journeys.pm | 6 ++++-- 1 file 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 // [] } ) { -- cgit v1.2.3