Skip to content

Commit dd075fa

Browse files
committed
Use ?.
1 parent 06fe6b7 commit dd075fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vs/workbench/contrib/webview/browser/webviewElement.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,7 @@ export class IFrameWebview extends Disposable implements Webview {
316316
}
317317

318318
override dispose(): void {
319-
if (this.element) {
320-
this.element.remove();
321-
}
319+
this.element?.remove();
322320
this._element = undefined;
323321

324322
this._onDidDispose.fire();
@@ -467,7 +465,7 @@ export class IFrameWebview extends Disposable implements Webview {
467465
}
468466
this._hasAlertedAboutMissingCsp = true;
469467

470-
if (this.extension && this.extension.id) {
468+
if (this.extension?.id) {
471469
if (this._environmentService.isExtensionDevelopment) {
472470
this._onMissingCsp.fire(this.extension.id);
473471
}

0 commit comments

Comments
 (0)