From 3b0498d39c89566820e02728d04fd142c7da3240 Mon Sep 17 00:00:00 2001 From: juji Date: Fri, 23 Jun 2023 21:32:19 +0700 Subject: [PATCH] fix for issue #356 --- src/Calendar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Calendar.js b/src/Calendar.js index 96935692..8785bae5 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -44,6 +44,7 @@ const Calendar = ({ }; calendarElement.current.addEventListener('keyup', handleKeyUp, false); return () => { + calendarElement.current && calendarElement.current.removeEventListener('keyup', handleKeyUp, false); }; });