Merge pull request #1206 from johankwarnmarksymphony/sda-2992_2

fix: sda-2992 safe guard if user config is missing
This commit is contained in:
Johan Kwarnmark 2021-03-29 11:10:38 +02:00 committed by GitHub
commit c621018c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -689,6 +689,12 @@ export class WindowHandler {
}
logger.info(`finished loading welcome screen.`);
if (this.url.indexOf('welcome')) {
const ssoValue =
this.userConfig.url &&
this.userConfig.url.indexOf('/login/sso/initsso') > -1
? true
: false;
this.mainWindow.webContents.send('page-load-welcome', {
locale: i18n.getLocale(),
resource: i18n.loadedResources,
@ -706,7 +712,7 @@ export class WindowHandler {
url: userConfigUrl || this.startUrl,
message: '',
urlValid: !!userConfigUrl,
sso: this.userConfig.url.indexOf('/login/sso/initsso') > -1,
sso: ssoValue,
});
}
});