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";
|
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();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue