From d649436f4db578127e3ce691c3c5bffe6c7203ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20UTARD?= Date: Thu, 8 Oct 2020 10:15:10 +0200 Subject: [PATCH] Geom field value should not be modified when deserializing its content --- leaflet/static/leaflet/leaflet.forms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leaflet/static/leaflet/leaflet.forms.js b/leaflet/static/leaflet/leaflet.forms.js index a66fa3e3..c4663a0b 100644 --- a/leaflet/static/leaflet/leaflet.forms.js +++ b/leaflet/static/leaflet/leaflet.forms.js @@ -83,8 +83,8 @@ L.FieldStore = L.Class.extend({ return null; } // Helps to get rid of the float value conversion error - this.formfield.value = JSON.stringify(JSON.parse(value)); - return L.GeoJSON.geometryToLayer(JSON.parse(value)); + var _value = JSON.stringify(JSON.parse(value)); + return L.GeoJSON.geometryToLayer(JSON.parse(_value)); }, });