From f7fa9bece3bba601c74041ab4e75796e95695532 Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Wed, 15 Feb 2023 14:23:15 -0800 Subject: [PATCH] Add a check for an undefined model when creating the connection dialog model. (#21953) --- .../services/connection/browser/connectionDialogService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/services/connection/browser/connectionDialogService.ts b/src/sql/workbench/services/connection/browser/connectionDialogService.ts index d1111c1c2b..289cacdb06 100644 --- a/src/sql/workbench/services/connection/browser/connectionDialogService.ts +++ b/src/sql/workbench/services/connection/browser/connectionDialogService.ts @@ -415,7 +415,7 @@ export class ConnectionDialogService implements IConnectionDialogService { } let newProfile = new ConnectionProfile(this._capabilitiesService, model || providerName); - if (!model.password) { + if (model && !model.password) { try { await this._connectionManagementService.addSavedPassword(newProfile); }