Skip to content

Commit

Permalink
Refactor enableTooltipError to use optional chain expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ipasic-softserve committed Jul 29, 2024
1 parent b9b6ada commit efa4455
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/sidebar-menu/SidebarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const SidebarMenu: FC<SidebarMenu> = ({

const isTabActive = tabKey === activeTab

const enableTooltipError =
!isTabActive && errorTooltipHolders && errorTooltipHolders[tabKey]
const enableTooltipError = !isTabActive && errorTooltipHolders?.[tabKey]

const toolTip = enableTooltipError && (
<Tooltip
Expand Down

0 comments on commit efa4455

Please sign in to comment.