Bob AI: Fix the button click handler error by properly handling the

This commit is contained in:
2026-02-24 10:11:49 +00:00
parent 259c8237df
commit 977c409688

View File

@@ -175,8 +175,10 @@ imageClassName = "",
const enhancedButtons = buttons?.map((button) => ({
...button,
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
handleButtonClick(e, button.onClick as (() => void) | undefined);
onClick: (e: React.MouseEvent<HTMLButtonElement> | null) => {
if (e && e.currentTarget) {
handleButtonClick(e, button.onClick as (() => void) | undefined);
}
},
}));