Merge pull request #38 from arifszn/close-37
feat: check the value of `localStorage.getItem` exists in the theme array
This commit is contained in:
commit
adc5fc857f
@ -7,8 +7,12 @@ export const getInitialTheme = () => {
|
||||
return config.themeConfig.default;
|
||||
}
|
||||
|
||||
if (!(localStorage.getItem('gitprofile-theme') === null)) {
|
||||
if (
|
||||
!(localStorage.getItem('gitprofile-theme') === null) &&
|
||||
config.themeConfig.themes.includes('gitprofile-theme')
|
||||
) {
|
||||
let theme = localStorage.getItem('gitprofile-theme');
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user