Permalink
Browse files

Fixed analytics breakage caused by unexpected maxmind value

  • Loading branch information...
omgimanerd committed Nov 20, 2017
1 parent 485d174 commit 7e365832ab0e75d5519d9a20eca5fbe3d3a47bcf
Showing with 2 additions and 1 deletion.
  1. +2 −1 server/analytics.js
View
@@ -62,7 +62,8 @@ const get = file => {
const locationData = lookupIp(json.ip)
json.country = 'unknown'
if (locationData) {
json.country = locationData.country.names.en
const country = locationData.country || locationData.registered_country
json.country = country.names.en
}
return json
})

0 comments on commit 7e36583

Please sign in to comment.