From 75f72c4d07c5b502a8fb4d514732b1d010c2272c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 29 Dec 2017 17:52:28 +0100 Subject: [PATCH] Return empty aggregation configuration when the map-config is vector-only and the layer has no aggregation --- lib/cartodb/models/aggregation/aggregation-mapconfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/models/aggregation/aggregation-mapconfig.js b/lib/cartodb/models/aggregation/aggregation-mapconfig.js index e08f3024..bc93ceab 100644 --- a/lib/cartodb/models/aggregation/aggregation-mapconfig.js +++ b/lib/cartodb/models/aggregation/aggregation-mapconfig.js @@ -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;