diff --git a/app/javascript/mastodon/utils/theme.ts b/app/javascript/mastodon/utils/theme.ts index 767d97cf5c..921787a6c4 100644 --- a/app/javascript/mastodon/utils/theme.ts +++ b/app/javascript/mastodon/utils/theme.ts @@ -5,9 +5,7 @@ export function getUserTheme() { export function isDarkMode() { const { userTheme } = document.documentElement.dataset; - return ( - (userTheme === 'system' && - window.matchMedia('(prefers-color-scheme: dark)').matches) || - userTheme !== 'mastodon-light' - ); + return userTheme === 'system' + ? window.matchMedia('(prefers-color-scheme: dark)').matches + : userTheme !== 'mastodon-light'; }