From 977c409688fd5e14700da02630afd9f00eea1886 Mon Sep 17 00:00:00 2001 From: kudindmitriy Date: Tue, 24 Feb 2026 10:11:49 +0000 Subject: [PATCH] Bob AI: Fix the button click handler error by properly handling the --- src/components/sections/hero/HeroBillboard.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/sections/hero/HeroBillboard.tsx b/src/components/sections/hero/HeroBillboard.tsx index 7d9e44b..b9afee6 100644 --- a/src/components/sections/hero/HeroBillboard.tsx +++ b/src/components/sections/hero/HeroBillboard.tsx @@ -175,8 +175,10 @@ imageClassName = "", const enhancedButtons = buttons?.map((button) => ({ ...button, - onClick: (e: React.MouseEvent) => { - handleButtonClick(e, button.onClick as (() => void) | undefined); + onClick: (e: React.MouseEvent | null) => { + if (e && e.currentTarget) { + handleButtonClick(e, button.onClick as (() => void) | undefined); + } }, }));