aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/address.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/address.js b/lib/address.js
index 6d9748fd..684914ce 100644
--- a/lib/address.js
+++ b/lib/address.js
@@ -133,7 +133,10 @@ var address = {
return [radiansToDegrees(lat2), radiansToDegrees(lon2)];
}
- location = location || [faker.latitude(), faker.longitude()]
+ // If there is no coordinate, the best we can do is return a random GPS coordinate.
+ if (coordinate === undefined) {
+ return [this.latitude(), this.longitude()]
+ }
radius = radius || 10.0;
isMetric = isMetric || false;