Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jul 21, 2021
1 parent 67be53d commit cc73182
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/TabNavList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
onFocus={() => {
scrollToTab(key);
doLockAnimation();

if (tabsWrapperRef.current) {
// Focus element will make scrollLeft change which we should reset back
if (!rtl) {
tabsWrapperRef.current.scrollLeft = 0;
}
tabsWrapperRef.current.scrollTop = 0;
if (!tabsWrapperRef.current) {
return;
}
// Focus element will make scrollLeft change which we should reset back
if (!rtl) {
tabsWrapperRef.current.scrollLeft = 0;
}
tabsWrapperRef.current.scrollTop = 0;
}}
/>
);
Expand Down

0 comments on commit cc73182

Please sign in to comment.