From c6dbd0a4492965644c50fa703ca31a38d1f1bd9e Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Thu, 5 Jun 2025 15:05:20 +0100 Subject: [PATCH] fix: resolve existingAlert undefined error in alert management modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/public/js/ui/alertManagementModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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');