diff options
Diffstat (limited to 'lib/Travelynx/Model/Journeys.pm')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 3f2c0dd..5fa7e56 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1726,13 +1726,16 @@ sub get_connection_targets { my $min_count = $opt{min_count} // 3; if ( $opt{destination_name} ) { - return ( { eva => $opt{eva}, name => $opt{destination_name} } ); + return ( + [], + [ { eva => $opt{eva}, name => $opt{destination_name} } ] + ); } my $dest_id = $opt{eva} // $self->get_latest_dest_id(%opt); if ( not $dest_id ) { - return; + return ( [], [] ); } my $dest_ids = [ $dest_id, $self->{stations}->get_meta( eva => $dest_id ) ]; @@ -1754,7 +1757,7 @@ sub get_connection_targets { = $res->hashes->grep( sub { shift->{count} >= $min_count } ) ->map( sub { shift->{dest} } )->each; @destinations = $self->{stations}->get_by_evas(@destinations); - return @destinations; + return ( $dest_ids, \@destinations ); } sub update_visibility { |