From 3e1cbe1209cd5e83d7bcbff1e558bb9fdafc87f8 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 26 Nov 2015 15:38:29 +0100 Subject: [PATCH] workspace.rootPath should be undefined when no folder is open, not null. fixes #690 --- src/vs/workbench/api/browser/pluginHost.api.impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);