don't throw on place deselect (data is now null, not {})

This commit is contained in:
rlx 2014-09-26 13:20:48 +02:00
parent 02da127698
commit 177693b3ce

View file

@ -1038,7 +1038,7 @@ Ox.MapEditor = function(options, self) {
function selectPlace(place) {
// Select place on map
var isResult = !!place.id && place.id[0] == '_',
var isResult = place && place.id[0] == '_',
isUndefined = !!self.options.selected
&& !self.$list.value(self.options.selected, 'type');
self.selectedPlace = place.id || '';