Skip to content

Commit

Permalink
/release/modules: no single-value collapsing on 'modules'
Browse files Browse the repository at this point in the history
Keep single-value collapsing on data from 'fields', not from
'_source'.
  • Loading branch information
mickeyn committed Jul 4, 2017
1 parent c2bd56c commit b56b31b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/MetaCPAN/Document/Release.pm
Expand Up @@ -1148,8 +1148,10 @@ sub modules {
);
return unless $ret->{hits}{total};

my @files = map { single_valued_arrayref_to_scalar($_) }
map +{ %{ $_->{fields} }, %{ $_->{_source} } },
my @files = map +{
%{ ( single_valued_arrayref_to_scalar( $_->{fields} ) )[0] },
%{ $_->{_source} }
},
@{ $ret->{hits}{hits} };

return {
Expand Down

0 comments on commit b56b31b

Please sign in to comment.