Skip to content

Commit

Permalink
fix typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Aug 4, 2020
1 parent 2ab9fc0 commit b691504
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions x-pack/plugins/maps/public/classes/fields/es_agg_field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ export class ESAggField implements IESAggField {
supportsAutoDomain(): boolean {
return true;
}

canReadFromGeoJson(): boolean {
return true;
}
}

export function esAggFieldsFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ export class TopTermPercentageField implements IESAggField {
canValueBeFormatted(): boolean {
return false;
}

canReadFromGeoJson(): boolean {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
}

supportsMbFeatureState() {
return this._field && this._field.canReadFromGeoJson();
return !!this._field && this._field.canReadFromGeoJson();
}

getFieldMetaOptions() {
Expand Down

0 comments on commit b691504

Please sign in to comment.