diff --git a/query/search.js b/query/search.js index 147e2dfa..9e4d62f2 100644 --- a/query/search.js +++ b/query/search.js @@ -134,11 +134,7 @@ function calculateDiagonalDistance(clean) { 1000 ) / 1000; - if (diagonalDistance === 0) { - return 1; - } - - return diagonalDistance; + return Math.max(diagonalDistance, 1); }