From 9b5bb2cd06115d431c6cd459eb6034108db0d98b Mon Sep 17 00:00:00 2001 From: j Date: Fri, 30 Jun 2023 15:45:03 +0530 Subject: [PATCH] fix setting place to null --- source/UI/js/Map/MapEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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