Replace nested conditional with guard clause

This commit is contained in:
Daniel García Aubert 2017-12-12 10:49:05 +01:00
parent 06efe410ef
commit d405987a96

View File

@ -81,9 +81,15 @@ module.exports = class AggregationMapConfigAdapter {
if (aggregation === 'false') {
shouldAdapt = false;
} else if (aggregation === 'true') {
return shouldAdapt;
}
if (aggregation === 'true') {
shouldAdapt = true;
} else if (aggregation === undefined) {
return shouldAdapt;
}
if (aggregation === undefined) {
if (mapConfig.isVectorOnlyMapConfig()) {
shouldAdapt = true;
} else if (this._hasAnyLayerAggregation(requestMapConfig)){