Fix bug
This commit is contained in:
parent
4ca8ecf64c
commit
3dad225568
@ -8,6 +8,7 @@ function MapConfigNamedLayersAdapter(overviewsApi) {
|
||||
module.exports = MapConfigNamedLayersAdapter;
|
||||
|
||||
MapConfigNamedLayersAdapter.prototype.getLayers = function(username, layers, callback) {
|
||||
var self = this;
|
||||
|
||||
if (!layers) {
|
||||
return callback(null);
|
||||
@ -16,7 +17,7 @@ MapConfigNamedLayersAdapter.prototype.getLayers = function(username, layers, cal
|
||||
var augmentLayersQueue = queue(layers.length);
|
||||
|
||||
function augmentLayer(layer, done) {
|
||||
this.overviewsApi.getOverviewsMetadata(username, layer.options.sql, function(err, metadata){
|
||||
self.overviewsApi.getOverviewsMetadata(username, layer.options.sql, function(err, metadata){
|
||||
if ( !_.isEmpty(metadata) ) {
|
||||
layer = _.extend({}, layer, { overviews: metadata });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user