Fix connection prompt for publish database quickpick (#16767)

This commit is contained in:
Charles Gagnon
2021-08-14 11:57:41 -07:00
committed by GitHub
parent 7a57e62cd6
commit 6b5c909f7f

View File

@@ -76,7 +76,7 @@ export async function getPublishDatabaseSettings(project: Project, promptForConn
// 2. Select connection // 2. Select connection
let connectionProfile: IConnectionInfo | undefined = undefined; let connectionProfile: IConnectionInfo | undefined = undefined;
let dbs: string[] = []; let dbs: string[] | undefined = undefined;
let connectionUri: string | undefined; let connectionUri: string | undefined;
if (promptForConnection) { if (promptForConnection) {
const vscodeMssqlApi = await getVscodeMssqlApi(); const vscodeMssqlApi = await getVscodeMssqlApi();
@@ -95,6 +95,8 @@ export async function getPublishDatabaseSettings(project: Project, promptForConn
// back and prompt the user for a connection again // back and prompt the user for a connection again
} }
} }
} else {
dbs = [];
} }
// 3. Select database // 3. Select database