diff --git a/leaflet/static/leaflet/leaflet.extras.js b/leaflet/static/leaflet/leaflet.extras.js index 7c1c40e6..5b101de1 100644 --- a/leaflet/static/leaflet/leaflet.extras.js +++ b/leaflet/static/leaflet/leaflet.extras.js @@ -266,8 +266,10 @@ L.Map.djangoMap = function (id, options) { } }; -const imgPathElement = document.getElementById("force-img-path"); +{ + const imgPathElement = document.getElementById("force-img-path"); -if (!!imgPathElement) { + if (!!imgPathElement) { L.Icon.Default.imagePath = JSON.parse(imgPathElement.textContent); -} + } +} \ No newline at end of file