Return empty aggregation configuration when the map-config is vector-only and the layer has no aggregation

This commit is contained in:
Daniel García Aubert 2017-12-29 17:52:28 +01:00
parent 99b95cf839
commit 75f72c4d07

View File

@ -115,8 +115,8 @@ module.exports = class AggregationMapConfig extends MapConfig {
}
getAggregation (index) {
if (!this.hasLayerAggregation(index)) {
return;
if (this.isVectorOnlyMapConfig() && !this.hasLayerAggregation(index)) {
return {};
}
const { aggregation } = this.getLayer(index).options;