From b819c554ee874856b23ff0458c0de0d33112524d Mon Sep 17 00:00:00 2001 From: David Larlet Date: Tue, 25 Jun 2024 20:53:02 -0400 Subject: [PATCH] chore: there is a difference between unset and delete --- umap/static/umap/js/umap.features.js | 3 ++- umap/static/umap/js/umap.share.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 972454d9..061030f6 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -396,7 +396,8 @@ U.FeatureMixin = { const geojson = this.parentClass.prototype.toGeoJSON.call(this) geojson.properties = this.cloneProperties() geojson.id = this.id - geojson.properties._storage_options = undefined + // biome-ignore lint/performance/noDelete: we do not want the key at all. + delete geojson.properties._storage_options return geojson }, diff --git a/umap/static/umap/js/umap.share.js b/umap/static/umap/js/umap.share.js index 83013938..567b8fd0 100644 --- a/umap/static/umap/js/umap.share.js +++ b/umap/static/umap/js/umap.share.js @@ -21,7 +21,8 @@ U.Share = L.Class.extend({ map.eachFeature((feature) => { const row = feature.toGeoJSON().properties const center = feature.getCenter() - row._umap_options = undefined + // biome-ignore lint/performance/noDelete: we do not want the key at all. + delete row._umap_options row.Latitude = center.lat row.Longitude = center.lng table.push(row)