Skip to content

Commit

Permalink
Check window
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Dec 18, 2024
1 parent fea9fdc commit 01d3bf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/UnifiedSidenav/UnifiedSidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const caretStyle = css`
`;

function isSelectedTab(slug) {
if (!window) return;
if (typeof window === 'undefined') return false;

return window.location.pathname === `${slug}/`;
}
Expand Down

0 comments on commit 01d3bf8

Please sign in to comment.