diff --git a/packages/plugin-ext/src/plugin/workspace.ts b/packages/plugin-ext/src/plugin/workspace.ts index ab4032c17ce97..2a2419c16e393 100644 --- a/packages/plugin-ext/src/plugin/workspace.ts +++ b/packages/plugin-ext/src/plugin/workspace.ts @@ -71,7 +71,7 @@ export class WorkspaceExtImpl implements WorkspaceExt { } get name(): string | undefined { - if (this.workspaceFolders) { + if (this.workspaceFolders && this.workspaceFolders.length > 0) { return new Path(this.workspaceFolders[0].uri.path).base; }