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";
this.promise = new Promise<void>((resolve => {
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe(
(communityInformation: Portal) => {
this.portal.next(communityInformation);
(portal: Portal) => {
this.portal.next(portal);
resolve();
},
error => {
this.portal.error(error);
this.portal.next(null);
resolve();
});
}));