don't clone places if its a function

This commit is contained in:
j 2025-08-11 18:26:33 +02:00
commit c4591c3a0e

View file

@ -49,7 +49,7 @@ Ox.MapEditor = function(options, self) {
places: function() {
self.isAsync = Ox.isFunction(self.options.places);
self.$list.options({
items: Ox.clone(self.options.places)
items: self.isAsync ? self.options.places : Ox.clone(self.options.places)
})
self.$map.options({
places: self.options.places
@ -337,7 +337,7 @@ Ox.MapEditor = function(options, self) {
columns: self.columns,
columnsRemovable: true,
columnsVisible: true,
items: Ox.clone(self.options.places),
items: self.isAsync ? self.options.places : Ox.clone(self.options.places),
//items: self.options.places,
// area needed for icon, geoname needed for flag
keys: ['area', 'geoname', 'matches'],