Skip to content

Commit

Permalink
fix: fixed window undefined linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardNew committed Nov 6, 2024
1 parent a34cce5 commit 90507cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ export default function Page() {
);

useEffect(() => {
if (typeof window === 'undefined') {
return;
}
window
.matchMedia('(min-width: 1100px)')
.addEventListener('change', e => setMatches(e.matches));
Expand Down

0 comments on commit 90507cf

Please sign in to comment.