Skip to content
Snippets Groups Projects
Commit b02c11a5 authored by deuce's avatar deuce
Browse files

Continue retrying until a country is included in the response.

parent 50e9cd90
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,12 @@ function get_geoip(host, countryonly)
if(GeoIP.Locations != undefined) {
if(isarray)
return GeoIP.Locations;
if(!GeoIP.Locations[0].countryName)
continue;
return GeoIP.Locations[0];
}
if(!GeoIP.countryName)
continue;
return GeoIP;
}
catch(e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment