diff --git a/src/vs/workbench/api/browser/pluginHost.api.impl.ts b/src/vs/workbench/api/browser/pluginHost.api.impl.ts index eacd47d1fa8..bdc5061e270 100644 --- a/src/vs/workbench/api/browser/pluginHost.api.impl.ts +++ b/src/vs/workbench/api/browser/pluginHost.api.impl.ts @@ -189,7 +189,7 @@ export class PluginHostAPIImplementation { }; // - const workspacePath = contextService.getWorkspace() && contextService.getWorkspace().resource.fsPath; + const workspacePath = contextService.getWorkspace() ? contextService.getWorkspace().resource.fsPath : undefined; const pluginHostFileSystemEvent = threadService.getRemotable(PluginHostFileSystemEventService); const pluginHostWorkspace = new PluginHostWorkspace(this._threadService, workspacePath); const pluginHostDocuments = this._threadService.getRemotable(PluginHostModelService);