mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +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:
@@ -57,9 +57,7 @@ export class TestRPCProtocol implements IExtHostContext, IExtHostRpcService {
|
||||
private set _callCount(value: number) {
|
||||
this._callCountValue = value;
|
||||
if (this._callCountValue === 0) {
|
||||
if (this._completeIdle) {
|
||||
this._completeIdle();
|
||||
}
|
||||
this._completeIdle?.();
|
||||
this._idle = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user