Skip to content

Commit

Permalink
don't crash if there is no theme in config
Browse files Browse the repository at this point in the history
  • Loading branch information
tytremblay committed Dec 20, 2024
1 parent f273a92 commit 56eb92e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export function ThemeProvider({
const appTheme = useQRScoutState(state => state.formData.theme);

useEffect(() => {
if (!appTheme || !appTheme.light || !appTheme.dark) return;
if (resolvedTheme === 'dark') {
console.log('Setting dark theme', appTheme.dark);
setColorScheme(appTheme.dark);
Expand Down

0 comments on commit 56eb92e

Please sign in to comment.