diff --git a/src/renderer/components/dock/dock-tabs.tsx b/src/renderer/components/dock/dock-tabs.tsx index 4e4c9b090d..dbf7f3ad56 100644 --- a/src/renderer/components/dock/dock-tabs.tsx +++ b/src/renderer/components/dock/dock-tabs.tsx @@ -56,9 +56,9 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs }; const updateScrollbarVisibility = () => { - const allTabsShrinked = getTabElements().every(tab => tab.offsetWidth == minTabSize.current); + const allTabsShrunk = getTabElements().every(tab => tab.offsetWidth == minTabSize.current); - setShowScrollbar(allTabsShrinked); + setShowScrollbar(allTabsShrunk); }; const scrollTabsWithMouseWheel = (left: number) => { diff --git a/src/renderer/components/dock/dock.tsx b/src/renderer/components/dock/dock.tsx index 9f2d1bbfe3..1a2177c88f 100644 --- a/src/renderer/components/dock/dock.tsx +++ b/src/renderer/components/dock/dock.tsx @@ -93,7 +93,7 @@ class NonInjectedDock extends React.Component { const nextIndex = currentIndex + direction; // check if moving to the next or previous tab is possible. - if (currentIndex!== -1 && (nextIndex >= tabs.length || nextIndex < 0)) return; + if (nextIndex >= tabs.length || nextIndex < 0) return; const nextElement = tabs[nextIndex];