From 28ea6b5820be2c790826975ea306b333ac8f7a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20M=C3=A9tral?= Date: Fri, 24 Jun 2022 15:25:58 +0200 Subject: [PATCH] [fixed] Fix missing returns in keydown helpers --- src/components/ModalPortal.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/ModalPortal.js b/src/components/ModalPortal.js index 4db77201..7f20df67 100644 --- a/src/components/ModalPortal.js +++ b/src/components/ModalPortal.js @@ -22,12 +22,8 @@ const CLASS_NAMES = { * `KeyboardEvent.code` for apps that still support IE11. Can be removed when * `react-modal` only supports React >18 (which dropped IE support). */ -const isTabKey = event => { - event.code === "Tab" || event.keyCode === 9; -}; -const isEscKey = event => { - event.code === "Escape" || event.keyCode === 27; -}; +const isTabKey = event => event.code === "Tab" || event.keyCode === 9; +const isEscKey = event => event.code === "Escape" || event.keyCode === 27; let ariaHiddenInstances = 0;