Skip to content

Commit bd866a9

Browse files
committed
fix eslint errors
1 parent dc83371 commit bd866a9

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

x-pack/legacy/plugins/maps/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const EMS_XYZ = 'EMS_XYZ'; // identifies a custom TMS source. Name is a l
5858
export enum FIELD_ORIGIN {
5959
SOURCE = 'source',
6060
JOIN = 'join',
61-
};
61+
}
6262

6363
export const SOURCE_DATA_ID_ORIGIN = 'source';
6464
export const META_ID_ORIGIN_SUFFIX = 'meta';

x-pack/legacy/plugins/maps/public/layers/sources/es_agg_source.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { IESSource } from './es_source';
88
import { AbstractESSource } from './es_source';
99
import { AGG_TYPE } from '../../../common/constants';
1010

11-
1211
export interface IESAggSource extends IESSource {
1312
getAggKey(aggType: AGG_TYPE, fieldName: string): string;
1413
getAggLabel(aggType: AGG_TYPE, fieldName: string): string;

x-pack/legacy/plugins/maps/public/layers/sources/es_agg_source.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,9 @@ export class AbstractESAggSource extends AbstractESSource {
5555

5656
getMetricFields() {
5757
const metrics = this._metricFields.filter(esAggField => esAggField.isValid());
58-
if (metrics.length === 0) {
59-
metrics.push(
60-
new ESAggMetricField({
61-
aggType: AGG_TYPE.COUNT,
62-
source: this,
63-
origin: this.getOriginForField(),
64-
})
65-
);
66-
}
67-
return metrics;
58+
return metrics.length === 0
59+
? esAggFieldsFactory({ type: AGG_TYPE.COUNT }, this, this.getOriginForField())
60+
: metrics;
6861
}
6962

7063
getAggKey(aggType, fieldName) {

x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export class DynamicStyleProperty extends AbstractStyleProperty {
9898

9999
async getFieldMetaRequest() {
100100
if (this.isOrdinal()) {
101-
const fieldMetaOptions = this.getFieldMetaOptions();
102101
return this._field.getOrdinalFieldMetaRequest();
103102
} else if (this.isCategorical()) {
104103
return this._field.getCategoricalFieldMetaRequest();

0 commit comments

Comments
 (0)