biomejs/biome-vscode

Extension fails to activate when there are no workspace folders open

Closed this issue · 2 comments

If you open VS Code without any workspace folders (for example click File -> Close Folder) and then do anything that triggers the Biome extension to be activated (for example open a .ts file), the extension fails to activate with:

Activating extension 'biomejs.biome' failed: import_vscode6.workspace.workspaceFolders is not iterable.

Possibly caused by this code not handling undefined?

for (const workspaceFolder of workspace.workspaceFolders) {

Thanks for reporting @DanTup!

This should be an easy fix. I'll see what I can do.

Thanks!