mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
Use .?method() in more places (#152112)
Switches simple patterns like:
```ts
if (some.thing) {
some.thing.method();
}
```
to:
```ts
some.thing?.method()
```
This is more concise and avoids having to repeat the `some.thing` part
This commit is contained in:
@@ -29,9 +29,7 @@ export class StyleLoadingMonitor {
|
||||
return;
|
||||
}
|
||||
this.finishedLoading = true;
|
||||
if (this.poster) {
|
||||
this.poster.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles });
|
||||
}
|
||||
this.poster?.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,4 +39,4 @@ export class StyleLoadingMonitor {
|
||||
poster.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user