mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix error when opening create project from db dialog without connection (#23864)
* Fix error when opening create project from db dialog without connection * Update extensions/sql-database-projects/src/dialogs/createProjectFromDatabaseDialog.ts Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com> --------- Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com>
This commit is contained in:
@@ -51,7 +51,9 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
this.dialog.cancelButton.label = constants.cancelButtonText;
|
this.dialog.cancelButton.label = constants.cancelButtonText;
|
||||||
|
|
||||||
let connected = false;
|
let connected = false;
|
||||||
if (this.profile) {
|
|
||||||
|
// make sure the connection profile passed in has sufficient information to attempt to connect
|
||||||
|
if (this.profile && this.profile?.serverName) {
|
||||||
const connections = await getAzdataApi()!.connection.getConnections(true);
|
const connections = await getAzdataApi()!.connection.getConnections(true);
|
||||||
connected = !!connections.find(c => c.connectionId === this.profile!.id);
|
connected = !!connections.find(c => c.connectionId === this.profile!.id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user