From bd183cb377cb0e167bdd7d1c60d0fe5f0c9125b9 Mon Sep 17 00:00:00 2001 From: Mostafa Abdo Date: Wed, 11 Sep 2024 10:56:18 -0700 Subject: [PATCH] update config logic --- CSETWebNg/src/app/services/config.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CSETWebNg/src/app/services/config.service.ts b/CSETWebNg/src/app/services/config.service.ts index 5a6b0c8ea8..01a6fbe2f3 100644 --- a/CSETWebNg/src/app/services/config.service.ts +++ b/CSETWebNg/src/app/services/config.service.ts @@ -191,7 +191,12 @@ export class ConfigService { this.helpContactEmail = this.config.helpContactEmail; this.helpContactPhone = this.config.helpContactPhone; this.csetGithubApiUrl = this.config.csetGithubApiUrl; - + this.getDhsEmail().subscribe((resp: string) => { + this.dhsEmail = resp; + if (!this.helpContactEmail) { + this.helpContactEmail = resp; + } + }); // configure the reference document URL if the "library" property is defined // or if passed in as query param and stored as local storage variable. Local storage should // take precedence over the config file, since Electron uses it to dynamically set the port. @@ -214,9 +219,6 @@ export class ConfigService { this.checkOnlineStatusFromConfig(); this.populateLabelValues(); this.initialized = true; - this.getDhsEmail().subscribe((resp: string) => { - this.dhsEmail = resp; - }) } checkOnlineStatusFromConfig() {