Fix trying to `in` undefined for themes

ui/bot-profile
brecert 2021-09-17 17:30:14 -04:00
parent 2ff9c91287
commit 63479737a8
No known key found for this signature in database
GPG Key ID: 1B2E56B9EC985B96
1 changed files with 2 additions and 1 deletions

View File

@ -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];