From 10f9392d114ea855dffca5b03fa8915989b61ef9 Mon Sep 17 00:00:00 2001 From: Avijit Das Date: Tue, 23 Apr 2024 11:51:59 +0530 Subject: [PATCH] Update packages/terra-form-select/src/shared/_Tag.jsx Co-authored-by: Supreeth --- packages/terra-form-select/src/shared/_Tag.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/terra-form-select/src/shared/_Tag.jsx b/packages/terra-form-select/src/shared/_Tag.jsx index 56a954cc6cd..268f509addd 100644 --- a/packages/terra-form-select/src/shared/_Tag.jsx +++ b/packages/terra-form-select/src/shared/_Tag.jsx @@ -51,13 +51,8 @@ const Tag = ({ } } else { const nextLi = tagRef.current.nextElementSibling; - if (nextLi) { - const deselectElement = nextLi.children[1]; - if (deselectElement) { - deselectElement.focus(); - } else { - selectInput.focus(); - } + if (nextLi && nextLi.children[1]) { + nextLi.children[1].focus(); } else { selectInput.focus(); }