diff --git a/src/static-past-time-picker/QuickPicker.tsx b/src/static-past-time-picker/QuickPicker.tsx index daf85aaaac..9143fb0b26 100644 --- a/src/static-past-time-picker/QuickPicker.tsx +++ b/src/static-past-time-picker/QuickPicker.tsx @@ -55,7 +55,7 @@ function QuickPicker({ const handleCancel = () => { // onSelect(timeRange as string); - onCancel(); + onCancel?.(); }; useEffect(() => {