From ba79f62f67d294cb4ad42e86e18673238eee4a34 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 9 Aug 2024 12:20:06 +0200 Subject: get_connection_targets: always return a list Closes #152 Closes #153 --- lib/Travelynx/Model/Journeys.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index eca5167..031b0b1 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1771,7 +1771,10 @@ sub get_connection_targets { my $dest_id = $opt{eva}; if ( $opt{destination_name} ) { - return [ { eva => $opt{eva}, name => $opt{destination_name} } ]; + return { + eva => $opt{eva}, + name => $opt{destination_name} + }; } my $backend_id = $opt{backend_id}; @@ -1781,7 +1784,7 @@ sub get_connection_targets { } if ( not $dest_id ) { - return []; + return; } my $dest_ids = [ -- cgit v1.2.3