From 803c7907f10b89c86642bdb4b84480a47378e3ab Mon Sep 17 00:00:00 2001 From: Fx64b <90456762+Fx64b@users.noreply.github.com> Date: Tue, 18 Nov 2025 20:05:17 +0100 Subject: [PATCH] fix(HoverCard): add type assertion for event target in click handler --- src/components/HoverCard.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } });