Fix event add modal handler registration

This commit is contained in:
Simon Bruder 2024-08-09 00:46:13 +02:00
parent 89ce5b7d40
commit bbca62fa8b
Signed by: simon
GPG key ID: 347FF8699CDA0776

View file

@ -85,7 +85,10 @@
}) })
} }
document.getElementById("add-event-modal").addEventListener("show.bs.modal", e => { const addEventModal = document.getElementById("add-event-modal")
document.getElementById("event").value = e.relatedTarget.dataset.eventType if (addEventModal !== null) {
}) addEventModal.addEventListener("show.bs.modal", e => {
document.getElementById("event").value = e.relatedTarget.dataset.eventType
})
}
})() })()