From 7e43507f9c988a05cd42b927aebcf57de67926f1 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Thu, 12 Dec 2024 18:50:19 +0000 Subject: [PATCH] Adapt keyboard.js to handle undefined as well as null --- src/main/js/util/keyboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/js/util/keyboard.js b/src/main/js/util/keyboard.js index 88d677530416..11c414b6a5da 100644 --- a/src/main/js/util/keyboard.js +++ b/src/main/js/util/keyboard.js @@ -81,7 +81,7 @@ export default function makeKeyboardNavigable( } function scrollAndSelect(selectedItem, selectedClass, items) { - if (selectedItem !== null) { + if (selectedItem) { if (!isInViewport(selectedItem)) { selectedItem.scrollIntoView(false); }