Just remove analysis if there are analysis

This commit is contained in:
Raul Ochoa 2016-03-18 17:34:40 +01:00
parent 52f35d74b9
commit 1e239658d8

View File

@ -108,12 +108,12 @@ AnalysisMapConfigAdapter.prototype.getLayers = function(analysisConfiguration, r
if (Array.isArray(requestMapConfig.analyses)) {
requestMapConfig = replaceSourceRootQueries(requestMapConfig, analysisToRemove);
requestMapConfig = appendFiltersToNodes(requestMapConfig, dataviewsFiltersBySourceId);
}
if (Object.keys(dataviews).length === 0) {
requestMapConfig.analyses = requestMapConfig.analyses.filter(function(analysis, index) {
return !analysisToRemove.hasOwnProperty(index);
});
if (Object.keys(dataviews).length === 0) {
requestMapConfig.analyses = requestMapConfig.analyses.filter(function(analysis, index) {
return !analysisToRemove.hasOwnProperty(index);
});
}
}
if (!shouldAdaptLayers(requestMapConfig)) {