diff --git a/src/components/HoverCard.astro b/src/components/HoverCard.astro index ef92d2d..8737696 100644 --- a/src/components/HoverCard.astro +++ b/src/components/HoverCard.astro @@ -39,7 +39,7 @@ const {title, description, image = "", date} = Astro.props; // Close card when clicking outside (mobile only) document.addEventListener('click', (e) => { - if (window.innerWidth <= 768 && !card.contains(e.target)) { + if (window.innerWidth <= 768 && !card.contains(e.target as Node)) { card.classList.remove('active'); } });