Skip to content

Commit

Permalink
check if field exists (#16102)
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese authored Jan 18, 2018
1 parent 7cf8461 commit 88ed489
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/public/courier/data_source/_migrate_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export function migrateFilter(filter, indexPattern) {
const params = _.get(filter, ['match', fieldName]);
if (indexPattern) {
const field = indexPattern.fields.find(f => f.name === fieldName);
params.query = getConvertedValueForField(field, params.query);
if (field) {
params.query = getConvertedValueForField(field, params.query);
}
}
return {
match_phrase: {
Expand Down

0 comments on commit 88ed489

Please sign in to comment.