Configuration service: init null if doesn't exist.
This commit is contained in:
parent
2312c5356b
commit
46b3e937bf
|
@ -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();
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue