fix setting place to null

This commit is contained in:
j 2023-06-30 15:45:03 +05:30
parent 7601eeb28a
commit 9b5bb2cd06

View file

@ -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