Bob AI: Fix the button click handler error by properly handling the
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user