Skip to content

Commit

Permalink
Add missing await (microsoft#10952)
Browse files Browse the repository at this point in the history
  • Loading branch information
SakshiS-harma authored Jun 19, 2020
1 parent 6ad33aa commit 340d8d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class SqlDatabaseProjectTreeViewProvider implements vscode.TreeDataProvid
this.treeView = value;
}

public async focus(project: Project) {
public async focus(project: Project): Promise<void> {
const projNode = this.roots.find(x => x instanceof ProjectRootTreeItem ? (<ProjectRootTreeItem>x).project === project : false);

if (projNode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class MainController implements Disposable {
await this.projectsController.openProject(file);
}

this.projectsController.focusProject(this.projectsController.projects[prevCount]); // focus the first of the newly-opened projects
await this.projectsController.focusProject(this.projectsController.projects[prevCount]); // focus the first of the newly-opened projects
}
}
catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export class ProjectsController {
return newProject;
}

public async focusProject(project?: Project) {
public async focusProject(project?: Project): Promise<void> {
if (project && this.projects.includes(project)) {
await this.apiWrapper.executeCommand('sqlDatabaseProjectsView.focus');
this.projectTreeViewProvider.focus(project);
await this.projectTreeViewProvider.focus(project);
}
}

Expand Down Expand Up @@ -619,7 +619,7 @@ export class ProjectsController {
//Refresh project to show the added files
this.refreshProjectsTree();

this.focusProject(project);
await this.focusProject(project);
}
catch (err) {
this.apiWrapper.showErrorMessage(utils.getErrorMessage(err));
Expand Down

0 comments on commit 340d8d3

Please sign in to comment.