Skip to content

Commit

Permalink
fix: loop to filter w/ async
Browse files Browse the repository at this point in the history
  • Loading branch information
evanandrewrose authored and zxch3n committed Jun 18, 2022
1 parent 3525acf commit a63778f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ export async function activate(context: vscode.ExtensionContext) {
)
return

const vitestEnvironmentFolders = vscode.workspace.workspaceFolders.filter(async folder =>
await isVitestEnv(folder) || getConfig(folder).enable)
const vitestEnvironmentFolders: Array<vscode.WorkspaceFolder> = []

for (const folder of vscode.workspace.workspaceFolders) {
if (await isVitestEnv(folder) || getConfig(folder).enable)
vitestEnvironmentFolders.push(folder)
}

if (vitestEnvironmentFolders.length === 0)
return
Expand Down

0 comments on commit a63778f

Please sign in to comment.