onChangeTheme: Guard against uninitialized redux
This commit is contained in:
parent
45d2df8d2b
commit
022a381397
1 changed files with 6 additions and 4 deletions
|
@ -2162,10 +2162,12 @@ type WhatIsThis = import('./window.d').WhatIsThis;
|
||||||
view.applyTheme();
|
view.applyTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
const theme = window.Events.getThemeSetting();
|
if (window.reduxActions && window.reduxActions.user) {
|
||||||
window.reduxActions.user.userChanged({
|
const theme = window.Events.getThemeSetting();
|
||||||
theme: theme === 'system' ? window.systemTheme : theme,
|
window.reduxActions.user.userChanged({
|
||||||
});
|
theme: theme === 'system' ? window.systemTheme : theme,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const FIVE_MINUTES = 5 * 60 * 1000;
|
const FIVE_MINUTES = 5 * 60 * 1000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue