don't show error message if cancelling out of import project connection picker (#11050)

This commit is contained in:
Kim Santiago
2020-06-23 10:29:55 -07:00
committed by GitHub
parent bcbf08122f
commit 29bf016fb8

View File

@@ -571,8 +571,12 @@ export class ProjectsController {
model.database = profile.databaseName;
}
else {
const connectionId = (await this.apiWrapper.openConnectionDialog()).connectionId;
const connection = await this.apiWrapper.openConnectionDialog();
if (!connection) {
return;
}
const connectionId = connection.connectionId;
const databaseList = await this.apiWrapper.listDatabases(connectionId);
const database = (await this.apiWrapper.showQuickPick(databaseList.map(dbName => { return { label: dbName }; })))?.label;