diff --git a/src/public/js/ui/alertManagementModal.js b/src/public/js/ui/alertManagementModal.js index 0e75742d1..62ee59f1f 100644 --- a/src/public/js/ui/alertManagementModal.js +++ b/src/public/js/ui/alertManagementModal.js @@ -1486,10 +1486,10 @@ ${isEditing ? 'Update Alert' : 'Create Alert'} `; document.body.insertAdjacentHTML('beforeend', modalHTML); - setupCustomAlertModalEvents(); + setupCustomAlertModalEvents(existingAlert); } - function setupCustomAlertModalEvents() { + function setupCustomAlertModalEvents(existingAlert = null) { const modal = document.getElementById('custom-alert-modal'); const closeBtn = document.getElementById('custom-alert-modal-close'); const cancelBtn = document.getElementById('custom-alert-cancel-button');