mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 04:17:13 +00:00
Check the value of localStorage.getItem exists in the theme array
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user