Merge pull request #816 from Chy-Zaber-Bin-Zahid/refactor/improve-code-readability
Simplify localStorage null check for better readability
This commit is contained in:
commit
1c6fee2935
@ -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