Order checks to validate if a layer should be adapted
This commit is contained in:
@@ -116,16 +116,16 @@ module.exports = class AggregationMapConfigAdapter {
|
||||
|
||||
const result = res.rows[0] || {};
|
||||
|
||||
if (!mapConfig.doesLayerReachThreshold(index, result.count)) {
|
||||
return callback(null, false);
|
||||
}
|
||||
|
||||
if (!AggregationMapConfig.supportsGeometryType(result.type)) {
|
||||
return callback(new Error(unsupportedGeometryTypeErrorMessage({
|
||||
geometryType: result.type
|
||||
})));
|
||||
}
|
||||
|
||||
if (!mapConfig.doesLayerReachThreshold(index, result.count)) {
|
||||
return callback(null, false);
|
||||
}
|
||||
|
||||
callback(null, true);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user