forked from abner/for-legacy-web
Fix trying to `in` undefined for themes
parent
2ff9c91287
commit
63479737a8
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue