Simplify localStorage null check for better readability
This commit is contained in:
parent
11e5e1734b
commit
2da8167bd8
@ -141,7 +141,7 @@ export const getInitialTheme = (themeConfig: SanitizedThemeConfig): string => {
|
||||
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
!(localStorage.getItem(LOCAL_STORAGE_KEY_NAME) === null)
|
||||
localStorage.getItem(LOCAL_STORAGE_KEY_NAME) !== null
|
||||
) {
|
||||
const savedTheme = localStorage.getItem(LOCAL_STORAGE_KEY_NAME);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user