From 9e11042313aa5191df98c591a39f71810935c0fc Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 25 Apr 2023 12:44:47 +0200 Subject: [PATCH] Merge pull request #21967 from liwn9527/its9527/fix-control-missing fix: controls missing when navigating from story --- code/ui/components/src/tabs/tabs.hooks.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/ui/components/src/tabs/tabs.hooks.tsx b/code/ui/components/src/tabs/tabs.hooks.tsx index 5ee337ce3b71..1b6cfafef206 100644 --- a/code/ui/components/src/tabs/tabs.hooks.tsx +++ b/code/ui/components/src/tabs/tabs.hooks.tsx @@ -141,11 +141,7 @@ export function useList(list: ChildrenList) { const newInvisibleList = list.filter((item) => { const { id } = item; const tabButton = tabRefs.current.get(id); - - if (!tabButton) { - return false; - } - const { width: tabWidth } = tabButton.getBoundingClientRect(); + const { width: tabWidth = 0 } = tabButton?.getBoundingClientRect() || {}; const crossBorder = x + widthSum + tabWidth > rightBorder;