🥅 Catch errors caused by null config (#682)

Fixes #682
This commit is contained in:
Alicia Sykes
2022-05-28 15:48:10 +01:00
committed by Alicia Sykes
parent fea51a1a75
commit 83dcc37985
3 changed files with 21 additions and 4 deletions

View File

@@ -31,7 +31,11 @@ export default class ConfigAccumulator {
appConfig() {
let appConfigFile = {};
// Set app config from file
if (this.conf) appConfigFile = this.conf.appConfig || buildConf.appConfig || {};
if (this.conf && this.conf.appConfig) {
appConfigFile = this.conf.appConfig;
} else if (buildConf && buildConf.appConfig) {
appConfigFile = buildConf.appConfig;
}
// Fill in defaults if anything missing
let usersAppConfig = defaultAppConfig;
if (localStorage[localStorageKeys.APP_CONFIG]) {