Fix a dumb bug with theme switching; Add TODO to clean this up

This commit is contained in:
Bryan Ashby 2022-08-04 10:52:43 -06:00
parent 715202680e
commit 7268ca9bd6
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 6 additions and 1 deletions

View File

@ -97,7 +97,12 @@ function Client(/*input, output*/) {
Object.defineProperty(this, 'currentTheme', {
get: () => {
if (this.currentThemeConfig) {
return this.currentThemeConfig.get();
// :TODO: clean this up: We have a ugly transition state in which we have a pure raw config vs a ConfigLoader in which get() must be called
try {
return this.currentThemeConfig.get();
} catch(e) {
return this.currentThemeConfig;
}
} else {
return {
info: {