Uncaught TypeError: document.getElementById(...) is null
<anonymous> http://localhost:8000/static/leaflet/draw/leaflet.draw.i18n.js:3
leaflet.draw.i18n.js:3:66
The issue is here:
...
if (withForms) {
L.drawLocal.draw.toolbar.actions.title = JSON.parse(document.getElementById("draw-toolbar-actions-title").textContent);
...
The JavaScript finds withForms to be true, but the corresponding JSON script elements weren't don't exist because the relevant template had its with_forms set to falsey.
With this minimal template:
...I see this error:
The issue is here:
The JavaScript finds
withForms
to betrue
, but the corresponding JSON script elements weren't don't exist because the relevant template had itswith_forms
set to falsey.