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 d89784d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/MetaCPAN/Document/Release.pm
Expand Up @@ -1148,9 +1148,10 @@ sub modules {
);
return unless $ret->{hits}{total};

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

return {
files => \@files,
Expand Down

0 comments on commit d89784d

Please sign in to comment.