Replace nested conditional with guard clause (early return)
This commit is contained in:
parent
5bf4eba215
commit
06efe410ef
@ -197,7 +197,10 @@ module.exports = class AggregationMapConfigAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_getAggregationMetadata (isVectorOnlyMapConfig, layer, adapted) {
|
_getAggregationMetadata (isVectorOnlyMapConfig, layer, adapted) {
|
||||||
if (adapted) {
|
if (!adapted) {
|
||||||
|
return { png: false, mvt: false };
|
||||||
|
}
|
||||||
|
|
||||||
if (isVectorOnlyMapConfig) {
|
if (isVectorOnlyMapConfig) {
|
||||||
return { png: false, mvt: true };
|
return { png: false, mvt: true };
|
||||||
}
|
}
|
||||||
@ -205,9 +208,6 @@ module.exports = class AggregationMapConfigAdapter {
|
|||||||
return { png: true, mvt: true };
|
return { png: true, mvt: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { png: false, mvt: false };
|
|
||||||
}
|
|
||||||
|
|
||||||
_getAggregationColumns (aggregation) {
|
_getAggregationColumns (aggregation) {
|
||||||
const hasAggregationColumns = aggregation !== undefined &&
|
const hasAggregationColumns = aggregation !== undefined &&
|
||||||
typeof aggregation !== 'boolean' &&
|
typeof aggregation !== 'boolean' &&
|
||||||
|
Loading…
Reference in New Issue
Block a user