Browse Source

switched to Math.max to avoid the explicit conditional

pull/304/head
Stephen Hess 9 years ago
parent
commit
a26bf0b9a8
  1. 6
      query/search.js

6
query/search.js

@ -134,11 +134,7 @@ function calculateDiagonalDistance(clean) {
1000
) / 1000;
if (diagonalDistance === 0) {
return 1;
}
return diagonalDistance;
return Math.max(diagonalDistance, 1);
}

Loading…
Cancel
Save