From 58706d1f99eb41610b8939c21e6213b3b8168757 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 10 Sep 2012 14:05:11 +0200 Subject: [PATCH] fix a potential JS error in Ox.Map --- source/Ox.UI/js/Map/Map.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/Ox.UI/js/Map/Map.js b/source/Ox.UI/js/Map/Map.js index 4797ac8f..839849da 100644 --- a/source/Ox.UI/js/Map/Map.js +++ b/source/Ox.UI/js/Map/Map.js @@ -577,12 +577,10 @@ Ox.Map = function(options, self) { } function addPlaceToPlaces(data) { - var place = getSelectedPlace(), + var place = Ox.extend(getSelectedPlace() || {}, data), country = place ? Ox.getCountryByGeoname(place.geoname) : {}; - Ox.extend(place, data); - self.options.selected = place.id; place.countryCode = country ? country.code : ''; - Ox.Log('Map', 'addP2P', data, place); + self.options.selected = place.id; setPlaceControls(place); place.marker.update(); place.rectangle.update();