diff --git a/public_html/script.js b/public_html/script.js
index ce21e36..823f228 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -894,10 +894,11 @@ function resetMap() {
function drawCircle(marker, distance) {
if (typeof distance === 'undefined') {
return false;
-
- if (!(!isNaN(parseFloat(distance)) && isFinite(distance)) || distance < 0) {
- return false;
- }
+ }
+
+ distance = parseFloat(distance);
+ if (isNaN(distance) || !isFinite(distance) || distance < 0) {
+ return false;
}
distance *= 1000.0;