1

Fixing server crash when geo data not provided

This commit is contained in:
Alex Yatskov 2014-11-22 18:33:16 +09:00
parent ae114e87aa
commit 35a7f0d8c8

View File

@ -230,7 +230,7 @@ function computeRecordGeo(records, geo) {
_.each(records, function(record) {
record.distance = 0.0;
if (geo !== null) {
if (geo) {
record.distance = geolib.getDistance(record.geo, geo) / 1000.0;
}