Skip to content

Commit 4e75415

Browse files
committed
optimize code
1 parent e7fafca commit 4e75415

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/EIDEProjectExplorer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3867,13 +3867,9 @@ export class ProjectExplorer implements CustomConfigurationProvider {
38673867

38683868
async showQuickPickAndSwitchActiveProject() {
38693869

3870-
const acvtiveProj = this.dataProvider.getActiveProject();
3871-
38723870
const selections: vscode.QuickPickItem[] = [];
38733871

38743872
this.dataProvider.foreachProject((proj) => {
3875-
if (acvtiveProj && proj.getUid() == acvtiveProj.getUid())
3876-
return;
38773873
selections.push(<any>{
38783874
uid: proj.getUid(),
38793875
label: proj.getProjectName(),
@@ -3892,6 +3888,8 @@ export class ProjectExplorer implements CustomConfigurationProvider {
38923888
if (result) {
38933889
const idx = this.dataProvider.getIndexByProjectUid(result.uid);
38943890
if (idx != -1) {
3891+
const acvtiveProj = this.dataProvider.getActiveProject();
3892+
if (acvtiveProj && result.uid == acvtiveProj.getUid()) return;
38953893
this.dataProvider.setActiveProject(idx);
38963894
}
38973895
}

0 commit comments

Comments
 (0)