Handle no layers case
This commit is contained in:
parent
8a036c79c7
commit
b63e697934
@ -11,6 +11,10 @@ module.exports = MapConfigNamedLayersAdapter;
|
||||
MapConfigNamedLayersAdapter.prototype.getLayers = function(username, layers, dbMetadata, callback) {
|
||||
var self = this;
|
||||
|
||||
if (!layers) {
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
var adaptLayersQueue = queue(layers.length);
|
||||
|
||||
function adaptLayer(layer, done) {
|
||||
|
@ -219,7 +219,9 @@ module.exports = function(serverOptions) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
requestMapConfig.layers = layers;
|
||||
if (layers) {
|
||||
requestMapConfig.layers = layers;
|
||||
}
|
||||
return callback(null, requestMapConfig, datasource);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user