Skip to content

Commit

Permalink
concat
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Apr 29, 2022
1 parent b578500 commit d68ab96
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export const formatFirstFields = async (
responsesFieldSpec.reduce(
(accumulator: IndexField[], fieldSpec: FieldSpec[], indexesAliasId: number) => {
const indexesAliasIdx = responsesFieldSpec.length > 1 ? indexesAliasId : null;
[...missingFields, ...fieldSpec].forEach((index) => {
missingFields.concat(fieldSpec).forEach((index) => {
const item = createFieldItem(beatFields, indexesAlias, index, indexesAliasIdx);
const alreadyExistingIndexField = indexFieldNameHash[item.name];
if (alreadyExistingIndexField != null) {
Expand All @@ -281,7 +281,7 @@ export const formatFirstFields = async (
accumulator[alreadyExistingIndexField].description = item.description;
}
accumulator[alreadyExistingIndexField].indexes = Array.from(
new Set([...existingIndexField.indexes, ...item.indexes])
new Set(existingIndexField.indexes.concat(item.indexes))
);
return;
}
Expand Down

0 comments on commit d68ab96

Please sign in to comment.