From c198e82f6789184fb10625de82bb1e8a0a5c0bad Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 31 Mar 2025 18:09:10 +0200 Subject: [PATCH] fix autocomplete not including exact matches This was broken by a29eff9fbe01a93a711e92f5554228e4c0186a23. --- lib/MetaCPAN/Query/File.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 311ac4028..019608966 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -452,7 +452,7 @@ sub _autocomplete { return { took => $sugg_res->{took} + $res->{took} + $fav_res->{took}, - suggestions => \@sorted, + suggestions => [ ( $exact ? $exact : () ), @sorted ], }; }