Last pass using ?.() for method call (#152231)

Follow up on f17b33faf2

This handles sightly more complex cases, changing:

```ts
if (a) {
    a.b.c();
}
```

to:

```ts
a?.b.c();
```
This commit is contained in:
Matt Bierner
2022-06-15 10:49:36 -07:00
committed by GitHub
parent 38bdf5ab7d
commit 13a80e03e2
25 changed files with 34 additions and 102 deletions

View File

@@ -172,9 +172,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
$deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number) {
const commentController = this._commentControllers.get(commentControllerHandle);
if (commentController) {
commentController.$deleteCommentThread(commentThreadHandle);
}
commentController?.$deleteCommentThread(commentThreadHandle);
}
$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined> {