Skip to content

Commit

Permalink
Return early when building dependencies view if no client (#1848)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored Mar 27, 2024
1 parent fd1ac60 commit 993c256
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vscode/src/dependenciesTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ export class DependenciesTree
private async fetchDependencies(): Promise<BundlerTreeNode[]> {
this.gemRootFolders = {};

if (!this.currentWorkspace) {
if (!this.currentWorkspace || !this.currentWorkspace.lspClient) {
return [];
}

const resp = (await this.currentWorkspace.lspClient?.sendRequest(
const resp = (await this.currentWorkspace.lspClient.sendRequest(
"rubyLsp/workspace/dependencies",
{},
)) as [
Expand Down

0 comments on commit 993c256

Please sign in to comment.