From f50b666307b8d0f3eee3086531e8939a82c8ae70 Mon Sep 17 00:00:00 2001 From: Anthony Shull Date: Mon, 15 Jul 2024 13:39:05 -0500 Subject: [PATCH] only auto open alert images on diversion pages --- assets/js/alert-item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/alert-item.js b/assets/js/alert-item.js index 5c29468791..76aee4ebbf 100644 --- a/assets/js/alert-item.js +++ b/assets/js/alert-item.js @@ -11,7 +11,7 @@ export const addAlertItemEventHandlers = () => { alertItem.addEventListener("click", handleAlertItemClick); alertItem.addEventListener("keydown", handleAlertItemKeyPress); - if (alertItem.querySelector("img")) { + if (document.querySelector(".diversions-template") && alertItem.querySelector("img")) { alertItem.click(); } });