Fixes the 'undefined' in connection tree when capabilities not loaded (#617)

* fixed the bug with loading the connection tree when capabilities not loaded
This commit is contained in:
Leila Lali
2018-02-06 13:13:48 -08:00
committed by GitHub
parent 3076390eb1
commit f5aa49ebb9
5 changed files with 38 additions and 19 deletions

View File

@@ -41,6 +41,11 @@ export class ConnectionConfig implements IConnectionConfig {
) {
this._providerCapabilitiesMap = {};
this.setCachedMetadata(cachedMetadata);
if (this._capabilitiesService && this._capabilitiesService.onCapabilitiesReady()) {
this._capabilitiesService.onCapabilitiesReady().then(() => {
this.setCachedMetadata(this._capabilitiesService.getCapabilities());
});
}
}
public setCachedMetadata(cachedMetadata: data.DataProtocolServerCapabilities[]): void {