fix a potential JS error in Ox.Map
This commit is contained in:
parent
7230606a6d
commit
58706d1f99
1 changed files with 2 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue