Stop triggering for single input query on sort_goodie
The sort_goodie should not be triggered for single numbers (input) query. This could be fixed by using a return statement check on handler. * goodie not triggered for single number (input) See also: #3144master
parent
c1e88730d9
commit
b9e8d190c4
|
@ -38,7 +38,8 @@ handle remainder => sub {
|
|||
|
||||
my $count = 0;
|
||||
@numbers = map { 0 + $_ } grep { ++$count <= MAX_LIST_SIZE } @numbers; # Normalize and limit list size.
|
||||
|
||||
return unless $count > 1;
|
||||
|
||||
my $unsorted_list = join($delim, @numbers);
|
||||
my $sorted_list = join($delim, sort { $ascending ? $a <=> $b : $b <=> $a } @numbers);
|
||||
my $dir = $ascending ? 'ascendingly' : 'descendingly';
|
||||
|
|
Loading…
Reference in New Issue