Fix: accept empty layers in the MapConfigOverviewsAdapter
This commit is contained in:
parent
c5b7d400f5
commit
4f8534afb3
@ -10,8 +10,8 @@ module.exports = MapConfigOverviewsAdapter;
|
||||
MapConfigOverviewsAdapter.prototype.getLayers = function(username, layers, callback) {
|
||||
var self = this;
|
||||
|
||||
if (!layers) {
|
||||
return callback(null);
|
||||
if (!layers || layers.length === 0) {
|
||||
return callback(null, layers);
|
||||
}
|
||||
|
||||
var augmentLayersQueue = queue(layers.length);
|
||||
@ -39,7 +39,7 @@ MapConfigOverviewsAdapter.prototype.getLayers = function(username, layers, callb
|
||||
}
|
||||
|
||||
if (!layers || layers.length === 0) {
|
||||
return callback(new Error('Missing layers array from layergroup config'));
|
||||
return callback(new Error('XX Missing layers array from layergroup config'));
|
||||
}
|
||||
|
||||
return callback(null, layers);
|
||||
|
Loading…
Reference in New Issue
Block a user