geo module: don't fail for undefined county names
This commit is contained in:
parent
d25d5f9ced
commit
511c355223
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ Ox.load.Geo = function(options, callback) {
|
||||||
|
|
||||||
Ox.getCountryByGeoname = function(geoname) {
|
Ox.getCountryByGeoname = function(geoname) {
|
||||||
// fixme: UAE correction doesn't belong here, fix in map
|
// fixme: UAE correction doesn't belong here, fix in map
|
||||||
geoname = geoname.replace(' - United Arab Emirates', ', United Arab Emirates')
|
geoname = (geoname || '').replace(' - United Arab Emirates', ', United Arab Emirates')
|
||||||
return Ox.getCountryByName(
|
return Ox.getCountryByName(
|
||||||
geoname.split(', ').pop()
|
geoname.split(', ').pop()
|
||||||
.replace('Sint Eustatius and Saba', 'Bonaire, Sint Eustatius and Saba')
|
.replace('Sint Eustatius and Saba', 'Bonaire, Sint Eustatius and Saba')
|
||||||
|
|
Loading…
Reference in a new issue