From 511c355223a85bcf176cfd68baaf7b24db73e29d Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Mon, 26 Mar 2012 11:07:57 +0000 Subject: [PATCH] geo module: don't fail for undefined county names --- source/Ox.Geo/Ox.Geo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox.Geo/Ox.Geo.js b/source/Ox.Geo/Ox.Geo.js index ac9c3520..081edd4a 100644 --- a/source/Ox.Geo/Ox.Geo.js +++ b/source/Ox.Geo/Ox.Geo.js @@ -150,7 +150,7 @@ Ox.load.Geo = function(options, callback) { Ox.getCountryByGeoname = function(geoname) { // 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( geoname.split(', ').pop() .replace('Sint Eustatius and Saba', 'Bonaire, Sint Eustatius and Saba')