Skip to content

Commit

Permalink
fix functional test, handle case where fields are not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jan 27, 2020
1 parent 85ab70d commit adda399
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/legacy/plugins/maps/public/components/metric_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import { SingleFieldSelect } from './single_field_select';
import { METRIC_TYPE } from '../../common/constants';

function filterFieldsForAgg(fields, aggType) {
if (!fields) {
return [];
}

if (aggType === METRIC_TYPE.UNIQUE_COUNT) {
return fields.filter(field => {
return field.aggregatable;
Expand Down

0 comments on commit adda399

Please sign in to comment.