Prevent problems with missing layers in mapconfig

This commit is contained in:
Javier Goizueta 2016-05-12 18:29:30 +02:00
parent fd44b62f26
commit 5fb7f07498

View File

@ -119,7 +119,7 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
mapConfig.obj().layers,
function(l){ return l.options.source && (l.options.source.id === sourceId); }
);
var queryRewriteData = layer.options.query_rewrite_data;
var queryRewriteData = layer && layer.options.query_rewrite_data;
if ( queryRewriteData ) {
if ( node.type === 'source' ) {
var filters = node.filters; // TODO: node.getFilters() when available in camshaft