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(); } });