aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resources/map.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/map.js b/resources/map.js
index 347d86e..1298c73 100644
--- a/resources/map.js
+++ b/resources/map.js
@@ -267,7 +267,9 @@ function initMap(self) {
}
function formatDistance(distance) {
- if (distance > 1000) {
+ if (distance == "Unknown") {
+ return distance;
+ } else if (distance > 1000) {
return (distance/1000).toFixed(2) + "km";
} else {
return distance.toFixed(0) + "m";