Do not override incoming arguments

This commit is contained in:
Daniel García Aubert 2018-07-30 16:00:30 +02:00
parent cca0848e6d
commit 13075460ac

View File

@ -39,10 +39,9 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
var ownFilter = +params.own_filter;
var noFilters = +params.no_filters;
if (Number.isFinite(ownFilter) && Number.isFinite(noFilters)) {
err = new Error();
err.message = 'Both own_filter and no_filters cannot be sent in the same request';
err.type = 'dataview';
err.http_status = 400;
const error = new Error('Both own_filter and no_filters cannot be sent in the same request');
error.type = 'dataview';
error.http_status = 400;
return callback(err);
}