Skip to content

Commit 1c6fee2

Browse files
authored
Merge pull request #816 from Chy-Zaber-Bin-Zahid/refactor/improve-code-readability
Simplify localStorage null check for better readability
2 parents 0aefe35 + 2da8167 commit 1c6fee2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const getInitialTheme = (themeConfig: SanitizedThemeConfig): string => {
141141

142142
if (
143143
typeof window !== 'undefined' &&
144-
!(localStorage.getItem(LOCAL_STORAGE_KEY_NAME) === null)
144+
localStorage.getItem(LOCAL_STORAGE_KEY_NAME) !== null
145145
) {
146146
const savedTheme = localStorage.getItem(LOCAL_STORAGE_KEY_NAME);
147147

0 commit comments

Comments
 (0)