Skip to content

Commit

Permalink
Fixed analytics breakage caused by unexpected maxmind value
Browse files Browse the repository at this point in the history
  • Loading branch information
omgimanerd committed Nov 20, 2017
1 parent 485d174 commit 7e36583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/analytics.js
Expand Up @@ -62,7 +62,8 @@ const get = file => {
const locationData = lookupIp(json.ip) const locationData = lookupIp(json.ip)
json.country = 'unknown' json.country = 'unknown'
if (locationData) { if (locationData) {
json.country = locationData.country.names.en const country = locationData.country || locationData.registered_country
json.country = country.names.en
} }
return json return json
}) })
Expand Down

0 comments on commit 7e36583

Please sign in to comment.