Commit 4fa1b2f7 authored by carlosribas's avatar carlosribas
Browse files

Use default value if floor is not found

parent 29a2e784
......@@ -69,7 +69,7 @@ var textSearchResults = {
var groups = lengthRegexp.exec(query);
ctrl.getFloorCeil(filteredQuery).then(
function(floorceil) {
floor = parseInt(floorceil[0].data.entries[0].highlights.length);
floor = parseInt(floorceil[0].data.entries[0].highlights.length) ? parseInt(floorceil[0].data.entries[0].highlights.length) : 10;
ceil = parseInt(floorceil[1].data.entries[0].highlights.length);
if (groups) {
......
Markdown is supported
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