From cfe4d21fb39e539612df893011ad59b9ceb6cf61 Mon Sep 17 00:00:00 2001 From: Kristian Antrobus Date: Fri, 8 Nov 2024 11:23:36 -0600 Subject: [PATCH] fix(tabs): missing current check --- packages/paste-core/components/tabs/src/TabList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/paste-core/components/tabs/src/TabList.tsx b/packages/paste-core/components/tabs/src/TabList.tsx index b1634fb812..78d606f552 100644 --- a/packages/paste-core/components/tabs/src/TabList.tsx +++ b/packages/paste-core/components/tabs/src/TabList.tsx @@ -79,7 +79,7 @@ const HorizontalTabList: React.FC { - if (ref.current) { + if (ref.current && scrollableRef.current) { scrollableRef.current?.addEventListener("scroll", handleScrollEvent); window.addEventListener("resize", handleScrollEvent); determineElementsOutOfBounds(scrollableRef.current, ref.current);