Skip to content

Commit 3b0498d

Browse files
committed
fix for issue Kiarash-Z#356
1 parent 0cd7478 commit 3b0498d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Calendar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const Calendar = ({
4444
};
4545
calendarElement.current.addEventListener('keyup', handleKeyUp, false);
4646
return () => {
47+
calendarElement.current &&
4748
calendarElement.current.removeEventListener('keyup', handleKeyUp, false);
4849
};
4950
});

0 commit comments

Comments
 (0)