diff --git a/src/main.ts b/src/main.ts index 87cfb00..98818f5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,6 +9,8 @@ if (require('electron-squirrel-startup')) app.quit(); app.commandLine.appendSwitch("force_high_performance_gpu"); app.commandLine.appendSwitch("enable-features", "SharedArrayBuffer"); +getAppConfig(); + /* Remove the comment (//) from the line below to ignore certificate errors (useful for self-signed certificates) */ //app.commandLine.appendSwitch("ignore-certificate-errors"); @@ -229,11 +231,11 @@ function getAppConfig(): AppConfig { try { const json = fs.readFileSync(path.join(app.getAppPath(), "config.json")).toString(); let appConfig = JSON.parse(json) as AppConfig; + const userData = getUserData(); + appConfig = {...appConfig, ...userData.app}; if (appConfig.ignoreCertificateErrors) { app.commandLine.appendSwitch("ignore-certificate-errors"); } - const userData = getUserData(); - appConfig = {...appConfig, ...userData.app}; return appConfig; } catch (e) { return {} as AppConfig;