mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Fix trying to in undefined for themes
This commit is contained in:
@@ -283,7 +283,8 @@ export function getBaseTheme(name: string): Theme {
|
||||
return PRESETS[name]
|
||||
}
|
||||
|
||||
const themes = getState().themes
|
||||
// TODO: properly initialize `themes` in state instead of letting it be undefined
|
||||
const themes = getState().themes ?? {}
|
||||
|
||||
if (name in themes) {
|
||||
const { theme } = themes[name];
|
||||
|
||||
Reference in New Issue
Block a user