diff --git a/lib/constants.ts b/lib/constants.ts index 70fb5b0..57869ab 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -28,7 +28,7 @@ export const colors = (theme: Theme = 'light') => { theme = 'dark'; } - if (userInfo.theme === 'dark') { + if (userInfo && userInfo.theme === 'dark') { theme = 'dark'; }