mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Adding null checks in disconnecting connections from async tree (#23636)
* Adding null checks in disconnecting connections * Fixing stuff * Update src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -527,7 +527,10 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
|
|||||||
await this._connectionManagementService.deleteConnection(profile);
|
await this._connectionManagementService.deleteConnection(profile);
|
||||||
}
|
}
|
||||||
const connectionProfile = this.getConnectionInTreeInput(profile.id);
|
const connectionProfile = this.getConnectionInTreeInput(profile.id);
|
||||||
|
// If the connection is not found in the tree, it means it was already deleted from the tree and we don't need to disconnect it
|
||||||
|
if (!connectionProfile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// For the connection profile, we need to clear the password from the last session if the user doesn't want to save it
|
// For the connection profile, we need to clear the password from the last session if the user doesn't want to save it
|
||||||
if (!connectionProfile.savePassword) {
|
if (!connectionProfile.savePassword) {
|
||||||
connectionProfile.password = '';
|
connectionProfile.password = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user