Skip to content

Commit

Permalink
fix: only set initial document state on client
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght authored Jul 9, 2024
1 parent 89629c8 commit 8bbfbe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/LanguageToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function LanguageToggle() {
const { refresh } = useRouter();

const [language, setLanguage] = useState<SupportedLanguage | undefined>(
getCookie()
typeof window !== 'undefined' ? getCookie() : undefined
);

return (
Expand Down

0 comments on commit 8bbfbe8

Please sign in to comment.