Skip to content

Commit

Permalink
revoke codeLnses empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
antimonyGu committed Jan 7, 2025
1 parent 71c209e commit 5454e81
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions clients/vscode/src/lsp/CodeLensMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,11 @@ export class CodeLensMiddleware implements VscodeLspCodeLensMiddleware {
}

this.removeDecorations(editor);
if (!codeLenses) {
return [];
}

const result = codeLenses
.map((codeLens) => this.handleCodeLens(codeLens, editor))
.filter((codeLens): codeLens is CodeLens => codeLens !== null);

const result =
codeLenses
?.map((codeLens) => this.handleCodeLens(codeLens, editor))
.filter((codeLens): codeLens is CodeLens => codeLens !== null) ?? [];
this.purgeDecorationMap();
return result;
}
Expand Down

0 comments on commit 5454e81

Please sign in to comment.