Commit 50c64d18 authored by Severine Duvaud's avatar Severine Duvaud
Browse files

Fixed bug with empty length param

parent b9fb0cc0
......@@ -83,7 +83,7 @@ function buildMongoQuery(params) {
var position = parseInt(params.start);
// not handled for now...
var length = (params.length.length == 0 ? 0 : parseInt(params.length));
// var length = (params.length.length == 0 ? 0 : parseInt(params.length));
var andConditions = [];
var orConditions = [];
......@@ -155,7 +155,11 @@ function checkResultAndGetResponse(params, samples, countTotal) {
}
}
var length = (params.length == '' ? 0 : parseInt(params.length));
var length = 0;
if (typeof params.length != undefined && params.length != null && params.length != '')
{
length = parseInt(params.length);
}
var queryResource = {
"referenceName": params.referenceName,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment