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:
Ariful Alam 2026-01-06 11:17:55 +06:00 committed by GitHub
commit 1c6fee2935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,7 +141,7 @@ export const getInitialTheme = (themeConfig: SanitizedThemeConfig): string => {
if ( if (
typeof window !== 'undefined' && 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); const savedTheme = localStorage.getItem(LOCAL_STORAGE_KEY_NAME);