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 6, 2025
1 parent 10e07d7 commit c98966c
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 c98966c

Please sign in to comment.