Do not fail if layergroup is undefined

This commit is contained in:
Daniel García Aubert 2017-08-03 12:22:30 +02:00
parent 7fed91900d
commit 90ded34af7

View File

@ -404,8 +404,11 @@ TestClient.prototype.getDataview = function(dataviewName, params, callback) {
);
},
function finish(err, dataview) {
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, dataview);
}
);