Skip to content

Commit 1c50238

Browse files
fix field-formatter lookup
1 parent 9ecaf76 commit 1c50238

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • x-pack/legacy/plugins/maps/public/layers/sources

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@ export class AbstractESSource extends AbstractVectorSource {
243243

244244
async getFieldFormatter(fieldName) {
245245

246-
const metricField = this.getMetricFields().find(({ propertyKey }) => {
247-
return propertyKey === fieldName;
248-
});
246+
const metricField = this.getMetricFields().find(field => field.getName() === fieldName);
249247

250248
// Do not use field formatters for counting metrics
251249
if (metricField && (metricField.type === METRIC_TYPE.COUNT || metricField.type === METRIC_TYPE.UNIQUE_COUNT)) {

0 commit comments

Comments
 (0)