Configuration service: init null if doesn't exist.

This commit is contained in:
Konstantinos Triantafyllou 2023-07-13 12:21:35 +03:00
parent 2312c5356b
commit 46b3e937bf
1 changed files with 3 additions and 3 deletions

View File

@ -30,12 +30,12 @@ export class ConfigurationService {
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full"; let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
this.promise = new Promise<void>((resolve => { this.promise = new Promise<void>((resolve => {
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe( this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe(
(communityInformation: Portal) => { (portal: Portal) => {
this.portal.next(communityInformation); this.portal.next(portal);
resolve(); resolve();
}, },
error => { error => {
this.portal.error(error); this.portal.next(null);
resolve(); resolve();
}); });
})); }));