diff --git a/hooks/useTheme.js b/hooks/useTheme.js index 1231e283..9807f866 100644 --- a/hooks/useTheme.js +++ b/hooks/useTheme.js @@ -6,7 +6,7 @@ import { useEffect } from 'react'; export default function useTheme() { const defaultTheme = - typeof window !== undefined + typeof window !== 'undefined' ? window?.matchMedia('prefers-color-scheme: dark')?.matches ? 'dark' : 'light'