handle empty time_zone

This commit is contained in:
Girish Ramakrishnan
2016-05-03 12:09:22 -07:00
parent 2cc37a9c31
commit 00ad1308aa

View File

@@ -203,7 +203,7 @@ function setTimeZone(ip, callback) {
return callback(null);
}
if (typeof result.body.time_zone !== 'string') {
if (!result.body.time_zone || typeof result.body.time_zone !== 'string') {
debug('No timezone in geoip response : %j', result.body);
return callback(null);
}