Skip to content

Commit

Permalink
fix(tabs): missing current check
Browse files Browse the repository at this point in the history
  • Loading branch information
krisantrobus committed Nov 8, 2024
1 parent cfc1c38 commit cfe4d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/paste-core/components/tabs/src/TabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const HorizontalTabList: React.FC<React.PropsWithChildren<{ variant?: Variants;
};

React.useEffect(() => {
if (ref.current) {
if (ref.current && scrollableRef.current) {
scrollableRef.current?.addEventListener("scroll", handleScrollEvent);
window.addEventListener("resize", handleScrollEvent);
determineElementsOutOfBounds(scrollableRef.current, ref.current);
Expand Down

0 comments on commit cfe4d21

Please sign in to comment.