mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
If the connectionProfile was undefined, then return undefined (#10899)
This commit is contained in:
@@ -128,7 +128,7 @@ export class MainThreadConnectionManagement extends Disposable implements MainTh
|
|||||||
return Promise.resolve(this._connectionManagementService.getServerInfo(connectionId));
|
return Promise.resolve(this._connectionManagementService.getServerInfo(connectionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async $openConnectionDialog(providers: string[], initialConnectionProfile?: IConnectionProfile, connectionCompletionOptions?: azdata.IConnectionCompletionOptions): Promise<azdata.connection.Connection> {
|
public async $openConnectionDialog(providers: string[], initialConnectionProfile?: IConnectionProfile, connectionCompletionOptions?: azdata.IConnectionCompletionOptions): Promise<azdata.connection.Connection | undefined> {
|
||||||
// Here we default to ConnectionType.editor which saves the connecton in the connection store by default
|
// Here we default to ConnectionType.editor which saves the connecton in the connection store by default
|
||||||
let connectionType = ConnectionType.editor;
|
let connectionType = ConnectionType.editor;
|
||||||
|
|
||||||
@@ -139,9 +139,12 @@ export class MainThreadConnectionManagement extends Disposable implements MainTh
|
|||||||
}
|
}
|
||||||
let connectionProfile = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,
|
let connectionProfile = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,
|
||||||
{ connectionType: connectionType, providers: providers }, initialConnectionProfile, undefined);
|
{ connectionType: connectionType, providers: providers }, initialConnectionProfile, undefined);
|
||||||
if (connectionProfile) {
|
|
||||||
connectionProfile.options.savePassword = connectionProfile.savePassword;
|
if (!connectionProfile) {
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connectionProfile.options.savePassword = connectionProfile.savePassword;
|
||||||
const connection = connectionProfile ? {
|
const connection = connectionProfile ? {
|
||||||
connectionId: connectionProfile.id,
|
connectionId: connectionProfile.id,
|
||||||
options: connectionProfile.options,
|
options: connectionProfile.options,
|
||||||
|
|||||||
Reference in New Issue
Block a user