Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3388411
D9699.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
559 B
Referenced Files
None
Subscribers
None
D9699.diff
View Options
diff --git a/lib/hooks/theme.js b/lib/hooks/theme.js
--- a/lib/hooks/theme.js
+++ b/lib/hooks/theme.js
@@ -48,12 +48,10 @@
if (themePreference === globalThemeInfo.preference) {
return;
}
-
- let theme = themePreference;
- if (themePreference === 'system') {
- theme = globalThemeInfo.systemTheme;
- }
-
+ const theme =
+ themePreference === 'system'
+ ? globalThemeInfo.systemTheme
+ : themePreference;
dispatch({
type: updateThemeInfoActionType,
payload: {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 2:11 PM (20 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2601231
Default Alt Text
D9699.diff (559 B)
Attached To
Mode
D9699: [Flow202][lib][skip-ci] [7/23] Fix Flow issues in useUpdateThemePreference by replacing let expression with ternary
Attached
Detach File
Event Timeline
Log In to Comment