Skip to content

Commit

Permalink
Merge pull request #63 from istresearch/kbn_7.8.1
Browse files Browse the repository at this point in the history
Kbn 7.8.1
  • Loading branch information
andrewkcarter committed Aug 14, 2020
2 parents fe25e5e + 927644e commit 6af651e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/hacks/custom_filter_bootstrap/index.js
Expand Up @@ -53,11 +53,11 @@ app.run([
const filterManagerHelper = new FilterManagerHelper(addFiltersCached);

filterManager.addFilters = (newFilters) => {
if (_.isArray(newFilters) && newFilters.length !== 1) {
addFiltersCached.apply(filterManager, newFilters);
} else {
const newFilter = newFilters[0];
if (_.isArray(newFilters) && newFilters.length === 0) {
return;
}

for (let newFilter of newFilters) {
const selectedIndexPatternID = _.get(newFilter, 'meta.index', null);
const fieldFormatMap = indexPatternLookup[selectedIndexPatternID];
const matchPhrase = _.get(newFilter, 'query.match_phrase', {});
Expand Down Expand Up @@ -101,7 +101,7 @@ app.run([
}

if (!customFilterFlag) {
addFiltersCached.apply(filterManager, newFilters);
addFiltersCached.apply(filterManager, [newFilter]);
}
}
};
Expand Down

0 comments on commit 6af651e

Please sign in to comment.