mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Fix empty connection name in delete connection prompt (#22001)
* Fix empty name in delete connection prompt * Update src/sql/workbench/services/objectExplorer/browser/connectionTreeAction.ts Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -290,7 +290,8 @@ export class DeleteConnectionAction extends Action {
|
||||
const deleteConnectionConfirmationNo = localize('deleteConnectionConfirmationNo', "No");
|
||||
|
||||
if (this.element instanceof ConnectionProfile) {
|
||||
const modalResult = await this._dialogService.show(Severity.Warning, localize('deleteConnectionConfirmation', "Are you sure you want to delete connection '{0}'?", this.element.connectionName),
|
||||
const name = this.element.connectionName || this.element.serverName;
|
||||
const modalResult = await this._dialogService.show(Severity.Warning, localize('deleteConnectionConfirmation', "Are you sure you want to delete connection '{0}'?", name),
|
||||
[deleteConnectionConfirmationYes, deleteConnectionConfirmationNo]);
|
||||
if (modalResult.choice === 0) {
|
||||
await this._connectionManagementService.deleteConnection(this.element);
|
||||
|
||||
Reference in New Issue
Block a user