mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 17:08:57 +01:00
onChangeTheme: Guard against uninitialized redux
This commit is contained in:
+6
-4
@@ -2162,10 +2162,12 @@ type WhatIsThis = import('./window.d').WhatIsThis;
|
||||
view.applyTheme();
|
||||
}
|
||||
|
||||
const theme = window.Events.getThemeSetting();
|
||||
window.reduxActions.user.userChanged({
|
||||
theme: theme === 'system' ? window.systemTheme : theme,
|
||||
});
|
||||
if (window.reduxActions && window.reduxActions.user) {
|
||||
const theme = window.Events.getThemeSetting();
|
||||
window.reduxActions.user.userChanged({
|
||||
theme: theme === 'system' ? window.systemTheme : theme,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const FIVE_MINUTES = 5 * 60 * 1000;
|
||||
|
||||
Reference in New Issue
Block a user