mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: update action start and end handlers to use explicit checks before calling
This commit is contained in:
@@ -225,7 +225,9 @@ const BulkUpdateForm: <T extends GenericObject>(
|
||||
totalItems: props.selectedItems,
|
||||
});
|
||||
setActionInProgress(true);
|
||||
props.onActionStart && props.onActionStart();
|
||||
if (props.onActionStart) {
|
||||
props.onActionStart();
|
||||
}
|
||||
},
|
||||
onBulkActionEnd: () => {
|
||||
setActionInProgress(false);
|
||||
@@ -290,7 +292,9 @@ const BulkUpdateForm: <T extends GenericObject>(
|
||||
submitButtonText="Close"
|
||||
onSubmit={() => {
|
||||
setShowProgressInfoModal(false);
|
||||
props.onActionEnd && props.onActionEnd();
|
||||
if (props.onActionEnd) {
|
||||
props.onActionEnd();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -97,7 +97,9 @@ const Button: FunctionComponent<ComponentProps> = ({
|
||||
switch (event.key) {
|
||||
case shortcutKey.toUpperCase():
|
||||
case shortcutKey.toLowerCase():
|
||||
onClick && onClick();
|
||||
if (onClick) {
|
||||
onClick();
|
||||
}
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user