Fixing server crash when geo data not provided
This commit is contained in:
parent
ae114e87aa
commit
35a7f0d8c8
@ -230,7 +230,7 @@ function computeRecordGeo(records, geo) {
|
|||||||
|
|
||||||
_.each(records, function(record) {
|
_.each(records, function(record) {
|
||||||
record.distance = 0.0;
|
record.distance = 0.0;
|
||||||
if (geo !== null) {
|
if (geo) {
|
||||||
record.distance = geolib.getDistance(record.geo, geo) / 1000.0;
|
record.distance = geolib.getDistance(record.geo, geo) / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user