mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
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:
@@ -7,8 +7,12 @@ export const getInitialTheme = () => {
|
|||||||
return config.themeConfig.default;
|
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');
|
let theme = localStorage.getItem('gitprofile-theme');
|
||||||
|
|
||||||
return theme;
|
return theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user