Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit76fce67

Browse files
authored
Added typing guards. (microsoft#11382)
1 parentf3e0f0b commit76fce67

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎Extension/ui/settings.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ class SettingsApp {
8181
// Set view state of advanced settings and add event
8282
constoldState:any=this.vsCodeApi.getState();
8383
constadvancedShown:boolean=oldState&&oldState.advancedShown;
84-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85-
document.getElementById(elementId.advancedSection)!.style.display=advancedShown ?"block" :"none";
84+
85+
constadvancedSection:HTMLElement|null=document.getElementById(elementId.advancedSection);
86+
if(advancedSection){
87+
advancedSection.style.display=advancedShown ?"block" :"none";
88+
}
89+
8690
document.getElementById(elementId.showAdvanced)?.classList.toggle(advancedShown ?"collapse" :"expand",true);
8791
document.getElementById(elementId.showAdvanced)?.addEventListener("click",this.onShowAdvanced.bind(this));
8892
this.vsCodeApi.postMessage({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp