Skip to content

Commit

Permalink
Fix error in header mobile menu (#2696)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge authored Jan 8, 2025
1 parent 300f7bf commit ca8f028
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function HeaderMobileMenu(props: Partial<React.ButtonHTMLAttributes<HTMLB
}
};

const windowRef = useRef(window);
const windowRef = useRef(typeof window === 'undefined' ? null : window);
useScrollListener(() => {
if (window.scrollY >= scrollDistance) {
setHasScrolled(true);
Expand Down

0 comments on commit ca8f028

Please sign in to comment.