Fix: accept empty layers in the MapConfigOverviewsAdapter

This commit is contained in:
Javier Goizueta 2016-02-10 12:16:37 +01:00
parent c5b7d400f5
commit 4f8534afb3

View File

@ -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);