Skip to content

Commit

Permalink
Fixes #257: LSP client that doesn't support any workspace capabilitie…
Browse files Browse the repository at this point in the history
…s will cause an error if the server is using workspace/workspaceFolders
  • Loading branch information
dbaeumer committed Oct 12, 2017
1 parent c42502f commit cbf3d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/workspaceFolders.proposed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const WorkspaceFoldersFeature: WorkspaceFeature<WorkspaceFolders> = (Base
private _unregistration: Thenable<Disposable>;
public initialize(capabilities: ClientCapabilities): void {
let workspaceCapabilities = (capabilities as Proposed.WorkspaceFoldersClientCapabilities).workspace;
if (workspaceCapabilities.workspaceFolders) {
if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
this._onDidChangeWorkspaceFolders = new Emitter<Proposed.WorkspaceFoldersChangeEvent>();
this.connection.onNotification(Proposed.DidChangeWorkspaceFoldersNotification.type, (params) => {
this._onDidChangeWorkspaceFolders.fire(params.event);
Expand Down

0 comments on commit cbf3d48

Please sign in to comment.