Merge conditions

This commit is contained in:
Raul Ochoa 2017-05-31 13:00:37 -04:00
parent b4fbe0b8cf
commit 4b562e6768

View File

@ -76,8 +76,7 @@ function getQueryRewriteData(mapConfig, dataviewDefinition, params) {
});
}
if (params.bbox) {
if ( queryRewriteData ) {
if (params.bbox && queryRewriteData) {
var bbox_filter_definition = {
type: 'bbox',
options: {
@ -90,7 +89,6 @@ function getQueryRewriteData(mapConfig, dataviewDefinition, params) {
};
queryRewriteData = _.extend(queryRewriteData, { bbox_filter: bbox_filter_definition });
}
}
return queryRewriteData;
}