From 19487ca1f4aaec8971d02fc56b703c284c6d392e Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Fri, 26 Apr 2024 14:11:39 +0200 Subject: [PATCH] Explicitly provide undefined to useRef() --- packages/react-date-picker/src/DateInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-date-picker/src/DateInput.tsx b/packages/react-date-picker/src/DateInput.tsx index c37cdaf7..9302bbb1 100644 --- a/packages/react-date-picker/src/DateInput.tsx +++ b/packages/react-date-picker/src/DateInput.tsx @@ -234,7 +234,7 @@ export default function DateInput({ const monthSelect = useRef(null); const dayInput = useRef(null); const [isCalendarOpen, setIsCalendarOpen] = useState(isCalendarOpenProps); - const lastPressedKey = useRef(); + const lastPressedKey = useRef(undefined); useEffect(() => { setIsCalendarOpen(isCalendarOpenProps);