Skip to content

Commit 08422bb

Browse files
authored
Avoid defining imgPathElement globally (#384)
1 parent 347f902 commit 08422bb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

leaflet/static/leaflet/leaflet.extras.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ L.Map.djangoMap = function (id, options) {
266266
}
267267
};
268268

269-
const imgPathElement = document.getElementById("force-img-path");
269+
{
270+
const imgPathElement = document.getElementById("force-img-path");
270271

271-
if (!!imgPathElement) {
272+
if (!!imgPathElement) {
272273
L.Icon.Default.imagePath = JSON.parse(imgPathElement.textContent);
273-
}
274+
}
275+
}

0 commit comments

Comments
 (0)