Check the value of localStorage.getItem exists in the theme array
This commit is contained in:
parent
f711238d73
commit
ab3eb39618
@ -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