Avoid uncaught exception when layergroup is not present

This commit is contained in:
Daniel García Aubert 2017-07-05 19:09:14 +02:00
parent 0684c1b9d3
commit 37c970903e

View File

@ -579,8 +579,10 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) {
});
},
function finish(err, res, image) {
self.keysToDelete['map_cfg|' + LayergroupToken.parse(layergroupId).token] = 0;
self.keysToDelete['user:localhost:mapviews:global'] = 5;
if (layergroupId) {
self.keysToDelete['map_cfg|' + LayergroupToken.parse(layergroupId).token] = 0;
self.keysToDelete['user:localhost:mapviews:global'] = 5;
}
return callback(err, res, image);
}
);