From 75326aa6eeb3164c6173d5c76cc656ba8de1d065 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 26 Jun 2023 08:02:15 +0200 Subject: [PATCH] Prevent from using an `id` when restoring a umap backup cf #1042 --- umap/static/umap/js/umap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 4de4df76..d4d0c6bf 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -905,6 +905,7 @@ L.U.Map.include({ if (importedData.geometry) this.options.center = this.latLng(importedData.geometry) const self = this importedData.layers.forEach((geojson) => { + delete geojson._umap_options['id'] // Never trust an id at this stage const dataLayer = self.createDataLayer(geojson._umap_options) dataLayer.fromUmapGeoJSON(geojson) })