chore: there is a difference between unset and delete

This commit is contained in:
David Larlet 2024-06-25 20:53:02 -04:00
parent 7a82b6547e
commit b819c554ee
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
2 changed files with 4 additions and 2 deletions

View file

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

View file

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