Skip to content

Commit

Permalink
Fix: 로컬스토리지에 값 없을때 발생하는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chichoon committed Jul 11, 2022
1 parent 2bb148c commit 0752ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const Router = () => {
const dispatch = useDispatch();

useMount(() => {
const colorTheme = store.get('colorTheme');
const colorTheme = store.get('colorTheme') || 'theme-sunrise';
dispatch(setTheme(colorTheme));
document.documentElement.setAttribute('color-theme', colorTheme ?? 'theme-sunrise');
document.documentElement.setAttribute('color-theme', colorTheme);
});

return (
Expand Down

0 comments on commit 0752ae6

Please sign in to comment.