fixed the issue caused by my latest check in in connection service (#2220)

This commit is contained in:
Leila Lali
2018-08-13 11:56:32 -07:00
committed by GitHub
parent 2b68e4a7df
commit 2304c32453

View File

@@ -157,8 +157,10 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._connecting = false; this._connecting = false;
} }
this.uiController.databaseDropdownExpanded = false; this.uiController.databaseDropdownExpanded = false;
if (this._dialogDeferredPromise) {
this._dialogDeferredPromise.resolve(undefined); this._dialogDeferredPromise.resolve(undefined);
} }
}
private handleDefaultOnConnect(params: INewConnectionParams, connection: IConnectionProfile): Thenable<void> { private handleDefaultOnConnect(params: INewConnectionParams, connection: IConnectionProfile): Thenable<void> {
let fromEditor = params && params.connectionType === ConnectionType.editor; let fromEditor = params && params.connectionType === ConnectionType.editor;
@@ -178,7 +180,9 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._connecting = false; this._connecting = false;
if (connectionResult && connectionResult.connected) { if (connectionResult && connectionResult.connected) {
this._connectionDialog.close(); this._connectionDialog.close();
if (this._dialogDeferredPromise) {
this._dialogDeferredPromise.resolve(connectionResult.connectionProfile); this._dialogDeferredPromise.resolve(connectionResult.connectionProfile);
}
} else if (connectionResult && connectionResult.errorHandled) { } else if (connectionResult && connectionResult.errorHandled) {
this._connectionDialog.resetConnection(); this._connectionDialog.resetConnection();
} else { } else {