diff --git a/source/UI/js/Map/MapEditor.js b/source/UI/js/Map/MapEditor.js index 1b358d7f..64b36988 100644 --- a/source/UI/js/Map/MapEditor.js +++ b/source/UI/js/Map/MapEditor.js @@ -1041,7 +1041,7 @@ Ox.MapEditor = function(options, self) { var isResult = place && place.id[0] == '_', isUndefined = !!self.options.selected && !self.$list.value(self.options.selected, 'type'); - self.selectedPlace = place.id || ''; + self.selectedPlace = place && place.id ? place.id : ''; if (isResult && isUndefined) { Ox.print('place.id', place.id, 'self.options.selected', self.options.selected, 'type', self.$list.value(self.options.selected)); // define undefined place