Skip to content

Commit

Permalink
Sergi fix 1
Browse files Browse the repository at this point in the history
Co-authored-by: Sergi Massaneda <sergi.massaneda@gmail.com>
  • Loading branch information
stephmilovic and semd committed Apr 27, 2023
1 parent dbed7a9 commit 7f97490
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ export const parseGroupingQuery = <T>(
buckets: Array<RawBucket<T>>
): Array<RawBucket<T> & GroupingBucket> =>
buckets.map((group) => {
const groupKeyArray = Array.isArray(group.key) ? group.key : [group.key];
if (!Array.isArray(group.key)) {
return group;
}
// If the keys are different means that the `missing` values of the multi_terms aggregation have been applied, we use the default empty string.
// If the keys are equal means the `missing` values have not been applied, they are stored values.
return groupKeyArray[0] === groupKeyArray[1]
Expand Down

0 comments on commit 7f97490

Please sign in to comment.