Replace nested conditional with guard clause
This commit is contained in:
parent
d405987a96
commit
c637caf9c9
@ -89,12 +89,14 @@ module.exports = class AggregationMapConfigAdapter {
|
||||
return shouldAdapt;
|
||||
}
|
||||
|
||||
if (aggregation === undefined) {
|
||||
if (mapConfig.isVectorOnlyMapConfig()) {
|
||||
shouldAdapt = true;
|
||||
} else if (this._hasAnyLayerAggregation(requestMapConfig)){
|
||||
shouldAdapt = true;
|
||||
}
|
||||
if (aggregation === undefined && mapConfig.isVectorOnlyMapConfig()) {
|
||||
shouldAdapt = true;
|
||||
return shouldAdapt;
|
||||
}
|
||||
|
||||
if (aggregation === undefined && this._hasAnyLayerAggregation(requestMapConfig)){
|
||||
shouldAdapt = true;
|
||||
return shouldAdapt;
|
||||
}
|
||||
|
||||
return shouldAdapt;
|
||||
|
Loading…
Reference in New Issue
Block a user