Skip to content

Commit 25c17fb

Browse files
committed
Fix: added window existence check to use breakpoint hook
1 parent 4a4f07c commit 25c17fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hooks/breakpoint.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const config = resolveConfig(tailwindConfig);
66

77
const calculateBreakpoints = () =>
88
Object.entries(config.theme.screens).reduce((acc, [key, value]) => {
9+
if (typeof window === "undefined") return acc;
910
acc[key] = window.matchMedia(`(min-width: ${value})`).matches;
1011
return acc;
1112
}, {});

0 commit comments

Comments
 (0)