mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Use optional method calls in more places (#151634)
This replaces code like:
```ts
if (foo.bar) {
foo.bar(cat);
}
```
with:
```ts
foo.bar?.(cat)
```
Which is more concise but has the same meaning
This commit is contained in:
@@ -546,9 +546,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
|
||||
}
|
||||
|
||||
$handleTextSearchResult(result: IRawFileMatch2, requestId: number): void {
|
||||
if (this._activeSearchCallbacks[requestId]) {
|
||||
this._activeSearchCallbacks[requestId](result);
|
||||
}
|
||||
this._activeSearchCallbacks[requestId]?.(result);
|
||||
}
|
||||
|
||||
saveAll(includeUntitled?: boolean): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user