biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
197 stars 22 forks source link

Extension fails to activate when there are no workspace folders open #95

Closed DanTup closed 7 months ago

DanTup commented 7 months ago

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?

https://github.com/biomejs/biome-vscode/blob/4ab1e11d9fbfac0e2f553723f484898436bb3b0a/src/main.ts#L384

nhedger commented 7 months ago

Thanks for reporting @DanTup!

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

DanTup commented 7 months ago

Thanks!