Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Feb 25, 2021
1 parent 90ba99f commit 75a3a4f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const getDataFromFieldsHits = (
const flat = [...accumulator, ...nestedFields].reduce(
(acc, f) => ({
...acc,
// acc is hashmap to determine if we already have the field or not without an array iteration
// its converted back to array in return with Object.values
...(acc[f.field] != null
? {
[f.field]: {
Expand Down

0 comments on commit 75a3a4f

Please sign in to comment.